Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

some code is userful,i hopy you can add in #19

@BEIBEI123

Description

@BEIBEI123

I hope you can add this code in article.py

``

__slots__ = (
    "pubmed_id",
    "title",
    "abstract",
    "keywords",
    "journal",
    "publication_date",
    "authors",
    "methods",
    "conclusions",
    "results",
    "copyrights",
    "doi",
    "volume",
    "issue",
    "pubdate_year",
    "pubdate_month"
)







def _extractVolume(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/Volume"
    return getContent(element=xml_element, path=path)

def _extractIssue(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/Issue"
    return getContent(element=xml_element, path=path)

def _extractPubDateYear(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/PubDate/Year"
    return getContent(element=xml_element, path=path)

def _extractPubDateMonth(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/PubDate/Month"
    return getContent(element=xml_element, path=path)





    self.volume = self._extractVolume(xml_element)
    self.issue = self._extractIssue(xml_element)
    self.pubdate_year = self._extractPubDateYear(xml_element)
    self.pubdate_month = self._extractPubDateMonth(xml_element)

``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions