From 556dbb4e68f802d46c2107ed1bcddc3dfe10dba9 Mon Sep 17 00:00:00 2001 From: Jannis Born Date: Fri, 18 Oct 2024 20:07:09 +0200 Subject: [PATCH] refactor: switch to pymed-paperscraper --- README.md | 3 +-- paperscraper/pubmed/pubmed.py | 2 +- paperscraper/pubmed/utils.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4807f10..ea20670 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,7 @@ But watch out. The resulting `.jsonl` file will be labelled according to the cur ## Examples -`paperscraper` is build on top of the packages [pymed](https://pypi.org/project/pymed/), -[arxiv](https://pypi.org/project/arxiv/) and [scholarly](https://pypi.org/project/scholarly/). +`paperscraper` is build on top of the packages [arxiv](https://pypi.org/project/arxiv/), [pymed](https://pypi.org/project/pymed-paperscraper/), and [scholarly](https://pypi.org/project/scholarly/). ### Publication keyword search diff --git a/paperscraper/pubmed/pubmed.py b/paperscraper/pubmed/pubmed.py index ec479a9..953d19a 100644 --- a/paperscraper/pubmed/pubmed.py +++ b/paperscraper/pubmed/pubmed.py @@ -3,7 +3,7 @@ from typing import List, Union import pandas as pd -from pymed import PubMed +from pymed_paperscraper import PubMed from ..utils import dump_papers from .utils import get_emails, get_query_from_keywords_and_date diff --git a/paperscraper/pubmed/utils.py b/paperscraper/pubmed/utils.py index e582958..ecbf29d 100644 --- a/paperscraper/pubmed/utils.py +++ b/paperscraper/pubmed/utils.py @@ -1,7 +1,7 @@ import warnings from typing import List, Union -from pymed.article import PubMedArticle +from pymed_paperscraper.article import PubMedArticle finalize_disjunction = lambda x: "(" + x[:-4] + ") AND " finalize_conjunction = lambda x: x[:-5] diff --git a/setup.py b/setup.py index 037ef5c..c2108f9 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ license="MIT", install_requires=[ "arxiv>=1.4.2", - "pymed", + "pymed-paperscraper", "pandas", "requests", "tqdm",