gijswobben / pymed

PyMed is a Python library that provides access to PubMed.
MIT License
190 stars 110 forks source link

Parse PubMed Central id #26

Open nleguillarme opened 4 years ago

nleguillarme commented 4 years ago

Having a PubMed Central id field in the Article object would be great, since this PMC id can be used to retrieve the full text of the article using this API

mbullmanFHCRC commented 4 years ago

Hi @nleguillarme , is the PubMed Central ID the 'PMC" prefixed ID from article ID fields?

In my fork I'm extracting all the articleID into a dictionary then you can grab the PMC ID (if it's available) from the dictionary. From what I've seen I don't think every article has a PMC ID, so might be a problem.

But feel free to use my fork of the project if needed. My _extractArticleID method uses a getContentList function to grab the articleIDs. From what I've seen PMCID isn't always available.

nleguillarme commented 4 years ago

Hi @mbullmanFHCRC, thank you, I will try your fork straightaway.

You're right, only the articles in PubMed Central (so with open access to the full-text) have a PMC id

mbullmanFHCRC commented 4 years ago

@nleguillarme , let me know if you run into any issues using it. I've been working on it the last couple weeks, but will probably be moving off it onto something else in the near future. I've basically brought in more fields from raw XML, hopefully it's useful to you!