Closed JesusMtzS closed 5 years ago
Hi! pyoai does the XML parsing for you, so the XML you are looking for is converted to these Metadata
objects that you see. You should be able to access your data from them.
Thank you so much I was handling the objects in a bad way
I'm running this code:
`from oaipmh.client import Client from oaipmh.metadata import MetadataRegistry, oai_dc_reader
URL = 'http://revista-iberoamericana.pitt.edu/ojs/index.php/Iberoamericana/oai' registry = MetadataRegistry() registry.registerReader('oai_dc', oai_dc_reader) client = Client(URL, registry)
for record in client.listRecords(metadataPrefix='oai_dc'): print(record) ` i was especting a kind of xml file on tuples, but the results are like this:
(<oaipmh.common.Header object at 0x00000251FAA16A20>, <oaipmh.common.Metadata object at 0x00000251FAA160B8>, None) (<oaipmh.common.Header object at 0x00000251FA9DB5C0>, <oaipmh.common.Metadata object at 0x00000251FA9C6518>, None) (<oaipmh.common.Header object at 0x00000251FA9DB0F0>, <oaipmh.common.Metadata object at 0x00000251FA9DB208>, None)
could you tellme if i'm forgetting something