Skip to content

Commit 86b55b2

Browse files
authored
Merge pull request internetarchive#11108 from internetarchive/refactor/remove-ol-redirects
remove old redirects
2 parents 8244644 + 2f5fb74 commit 86b55b2

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

openlibrary/views/showmarc.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,25 +96,14 @@ def GET(self, isbn):
9696

9797

9898
re_bad_meta_mrc = re.compile(r'^([^/]+)_meta\.mrc$')
99-
re_lc_sanfranpl = re.compile(r'^sanfranpl(\d+)/sanfranpl(\d+)\.out')
10099

101100

102101
class show_marc(app.view):
103102
path = r"/show-records/(.*):(\d+):(\d+)"
104103

105104
def GET(self, filename, offset, length):
106-
m = re_bad_meta_mrc.match(filename)
107-
if m:
105+
if m := re_bad_meta_mrc.match(filename):
108106
raise web.seeother('/show-records/ia:' + m.group(1))
109-
m = re_lc_sanfranpl.match(filename)
110-
if m: # archive.org is case-sensitive
111-
mixed_case = (
112-
f'SanFranPL{m.group(1)}/SanFranPL{m.group(2)}.out:{offset}:{length}'
113-
)
114-
raise web.seeother('/show-records/' + mixed_case)
115-
if filename == 'collingswoodlibrarymarcdump10-27-2008/collingswood.out':
116-
loc = f'CollingswoodLibraryMarcDump10-27-2008/Collingswood.out:{offset}:{length}'
117-
raise web.seeother('/show-records/' + loc)
118107

119108
loc = f"marc:{filename}:{offset}:{length}"
120109

0 commit comments

Comments
 (0)