How to use the scholarly.search_author function in scholarly

To help you get started, we’ve selected a few scholarly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chintu619 / citation-sorted-arxiv-slack-bot / arXiv_bot.py View on Github external
def getAuthorCitations(author):
#    print(author)
    # check if author has initials in name
    author_name_without_initials = author.split(' ')[0] + ' ' + author.split(' ')[-1]
    if author != author_name_without_initials:
        flag_authorHasInitialsInName = True
    else: flag_authorHasInitialsInName = False

    search_query = scholarly.search_author(author)
    try: # check if author is listed in google scholar
        author_stats = next(search_query)
        try: # if multiple people exist with same name, skip author
            next(search_query); author_count = 2
        except: author_count = 1
    except:
        author_count = 0

    # if author is uniquely identified in scholar, get citation count
    if author_count == 1:
        try: author_citation_count = author_stats.citedby
        except: author_citation_count = 0
    elif (author_count == 0) and flag_authorHasInitialsInName:
        author_citation_count = getAuthorCitations(author_name_without_initials)
    else:
        author_citation_count = 0
github chintu619 / citation-sorted-arxiv-slack-bot / webutils.py View on Github external
def getAuthorCitations(author):
#    print(author)
    # check if author has initials in name
    author_name_without_initials = author.split(' ')[0] + ' ' + author.split(' ')[-1]
    if author != author_name_without_initials:
        flag_authorHasInitialsInName = True
    else: flag_authorHasInitialsInName = False

    search_query = scholarly.search_author(author)
    try: # check if author is listed in google scholar
        author_stats = next(search_query)
        try: # if multiple people exist with same name, skip author
            next(search_query); author_count = 2
        except: author_count = 1
    except:
        author_count = 0

    # if author is uniquely identified in scholar, get citation count
    if author_count == 1:
        try: author_citation_count = author_stats.citedby
        except: author_citation_count = 0
    elif (author_count == 0) and flag_authorHasInitialsInName:
        author_citation_count = getAuthorCitations(author_name_without_initials)
    else:
        author_citation_count = 0
github xLeitix / slack_scholar / scholar-slack / scholar / backend / handler.py View on Github external
def query_scholar_for_author_profile(author):

    try:
        _author = next(scholarly.search_author(author))
    except:
        return "Ooopsie. Maybe we ran over the request limit?"

    if _author == None:
        return "Did not find a profile for %s" % author

    resp_str = ""
    resp_str += (_author.name + "\n")
    resp_str += (_author.affiliation + "\n")
    for interest in _author.interests:
        resp_str += (interest + ' - ')
    resp_str += "\n"
    resp_str += ("https://scholar.google.ch/citations?user=" + _author.id)

    return resp_str
github pelednoam / mmvt / src / misc / google_scholar.py View on Github external
def get_author(author_name):
    # Retrieve the author's data, fill-in, and print
    search_query = scholarly.search_author(author_name)
    author = next(search_query).fill()
    return author

scholarly

Simple access to Google Scholar authors and citations

Unlicense
Latest version published 2 years ago

Package Health Score

61 / 100
Full package analysis