Skip to content

Instantly share code, notes, and snippets.

@zimmerle
Created November 17, 2020 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zimmerle/c25505653db55f6be22f537f03cc546d to your computer and use it in GitHub Desktop.
Save zimmerle/c25505653db55f6be22f537f03cc546d to your computer and use it in GitHub Desktop.
#!env python
from scholarly import scholarly
import sys
authors_pub = """
Aad van Moorsel
Felipe Zimmerle da N. Costa
...
...
"""
authors = authors_pub.split("\n")
#print(str(authors))
for a in authors:
if a == "":
continue
try:
search_query = scholarly.search_author(a)
aa = next(search_query).fill()
print(str(a), end='')
#if 'hindex' in aa:
print("," + str(aa.hindex), end='')
print("," + str(aa.i10index), end='')
print("," + '; '.join(aa.interests))
except:
print("ops: " + a)
print(" --- Unexpected error:", sys.exc_info()[0])
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment