Skip to content

Commit

Permalink
remove excess variables and print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathos315 committed Jul 24, 2024
1 parent b9020fa commit 868370f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/webscrapers.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ def obtain(
sleep(self.sleep_val)

url = f"{self.url}search/match?query={search_text}&fields=url,paperId,year,authors,externalIds,title,publicationDate,abstract,citationCount,journal,fieldsOfStudy,citations,references"
print(url)

try:
response = client.get(url)
Expand All @@ -230,13 +229,13 @@ def obtain(
return None

paper_data = data["data"][0]
citation_wrapper: list[dict] = paper_data.get("citations", [])
reference_wrapper: list[dict] = paper_data.get("references", [])
citation_titles: list[str] = [
citation["title"] for citation in citation_wrapper
citation["title"]
for citation in paper_data.get("citations", [])
]
reference_titles: list[str] = [
reference["title"] for reference in reference_wrapper
reference["title"]
for reference in paper_data.get("references", [])
]

result = WebScrapeResult(
Expand Down

0 comments on commit 868370f

Please sign in to comment.