Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions google_scholar_crawler/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
from scholarly import scholarly
from scholarly import scholarly, ProxyGenerator
import jsonpickle
import json
from datetime import datetime
import os

# Setup proxy
pg = ProxyGenerator()
pg.FreeProxies() # Use free rotating proxies
scholarly.use_proxy(pg)

author: dict = scholarly.search_author_id(os.environ['GOOGLE_SCHOLAR_ID'])
scholarly.fill(author, sections=['basics', 'indices', 'counts', 'publications'])
name = author['name']
Expand All @@ -20,4 +25,4 @@
"message": f"{author['citedby']}",
}
with open(f'results/gs_data_shieldsio.json', 'w') as outfile:
json.dump(shieldio_data, outfile, ensure_ascii=False)
json.dump(shieldio_data, outfile, ensure_ascii=False)
5 changes: 3 additions & 2 deletions google_scholar_crawler/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
jsonpickle==1.4.2
scholarly==1.5.1
jsonpickle==4.0.5
scholarly==1.7.11
httpx==0.23.3