Skip to content
Snippets Groups Projects
Commit 94d2cda6 authored by gabriele-h's avatar gabriele-h
Browse files

Correct regexes for pids

parent 26adb001
Branches
No related tags found
No related merge requests found
......@@ -6,7 +6,8 @@ from catalogue.sru import almasru
class OnbRecordRetriever(almasru.RecordRetriever):
pid_re = re.compile(r'\d{7}')
dtl_re = re.compile(r'dtl\/\d*')
pid_re = re.compile(r'\d+')
def __init__(self,
subdomain: str = 'obv-at-oenb',
......@@ -47,7 +48,9 @@ class OnbRecordRetriever(almasru.RecordRetriever):
marc_856_note = marc_856_x.text
if 'ONB-DTL' in marc_856_note:
pids.append(self.pid_re.findall(marc_856_url)[0])
dtl_suffix = self.dtl_re.findall(marc_856_url)[0]
print(dtl_suffix)
pids.append(self.pid_re.findall(dtl_suffix))
return pids
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment