Skip to content

Commit

Permalink
Fix broken unit test for PMC (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
GjjvdBurg authored Jan 4, 2025
1 parent 16d4cf4 commit dc0c3a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions paper2remarkable/providers/pubmed.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ class PubMedInformer(Informer):
def _format_authors(self, soup_authors):
return super()._format_authors(soup_authors, sep=" ", idx=-1)

def _format_year(self, soup_date):
return soup_date.split(" ")[0]


class PubMed(Provider):
re_abs = r"https?://www.ncbi.nlm.nih.gov/pmc/articles/PMC\d+/?"
re_pdf = (
r"https?://www.ncbi.nlm.nih.gov/pmc/articles/PMC\d+/pdf/nihms\d+\.pdf"
)
re_abs = r"https?://pmc.ncbi.nlm.nih.gov/articles/PMC\d+/?"
re_pdf = r"https?://pmc.ncbi.nlm.nih.gov/articles/PMC\d+/pdf/nihms\d+\.pdf"

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit dc0c3a0

Please sign in to comment.