Skip to content

Commit

Permalink
This will fix the PMID parsing issue in articles for which currently
Browse files Browse the repository at this point in the history
multiple PMID's are getting parsed. Those other id's are likely the PMID's
of cited articles in the article under consideration.
resolves gijswobben#22
  • Loading branch information
ritvikvipra authored and ritvikvipra committed May 7, 2020
1 parent f2f79de commit ce854fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymed/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
self.__setattr__(field, kwargs.get(field, None))

def _extractPubMedId(self: object, xml_element: TypeVar("Element")) -> str:
path = ".//ArticleId[@IdType='pubmed']"
path = ".//PubmedData/ArticleIdList/ArticleId[@IdType='pubmed']"
return getContent(element=xml_element, path=path)

def _extractTitle(self: object, xml_element: TypeVar("Element")) -> str:
Expand Down

0 comments on commit ce854fe

Please sign in to comment.