Skip to content
Snippets Groups Projects
Commit af1d5839 authored by Georg's avatar Georg
Browse files

harvest ABO

parent 46041a34
No related branches found
No related tags found
No related merge requests found
......@@ -28,3 +28,7 @@ queried.
We show how to use [Sickle](https://sickle.readthedocs.io/en/latest/) to first list all available sets and then count
the number of entries in one specific set.
## [Harvest ABO Marc](harvest_abo_marc.py)
Small script to harvest ABO metadata in Marc format via OAI-PMH.
\ No newline at end of file
from sickle import Sickle
sickle = Sickle('https://eu02.alma.exlibrisgroup.com/view/oai/43ACC_ONB/request')
records = sickle.ListRecords(metadataPrefix='marc21', set='ABOMARC')
counter = 0
for record in records:
counter = counter + 1
print(counter)
with open('marc/' + str(counter) + '.xml', 'w') as fp:
fp.write(record.raw)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment