Harvest all records with python module oaipmh

118 views
Skip to first unread message

Patrick Brockmann

unread,
Sep 7, 2023, 3:37:58 AM9/7/23
to OAI-PMH
Hi All,

New with this protocol, I am trying to harvest metadata from a project.
I have worked with the oaipmh python module.

But I cannot get more than 50 records (there are 1501 records).

#======================================================
from oaipmh.client import Client
from oaipmh.metadata import MetadataRegistry, oai_dc_reader

URL = 'http://ws.pangaea.de/oai/provider?set=project4173'

registry = MetadataRegistry()
registry.registerReader('oai_dc', oai_dc_reader)
client = Client(URL, registry)

record = client.listRecords(metadataPrefix='oai_dc')

for record in client.listRecords(metadataPrefix='oai_dc'):
    print(record)

#======================================================

I have also tried oai-harvest from https://github.com/bloomonkey/oai-harvest
$ oai-harvest --limit 10000 --set project4173 http://ws.pangaea.de/oai/provider
and here it is ok I am able to save all records. 

How to do loop over all records with python module oaipmh ?

Any help welcomed.

Regards
P.
Reply all
Reply to author
Forward
0 new messages