Skip to main content

Simple access to Google Scholar authors and citations

Project description

scholarly.py is a module that allows you to retrieve author and publication information from Google Scholar in a friendly, Pythonic way.

Changes

Note that because of the nature of web scraping, this project will be in perpetual alpha.

v0.1.2

  • Now request HTTPS connection rather than HTTP and update test.py to account for a new “Zucker”. Also added information for the v0.1.1 revision.

v0.1.1

  • Fixed an issue with multi-page Author results, author entries with no citations (which are rare, but do occur), and added some tests using unittest.

v0.1

  • Initial release.

Requirements

Requires bibtexparser and Beautiful Soup.

Installation

Use pip:

pip install scholarly

Or clone the package:

git clone https://github.com/OrganicIrradiation/scholarly.git

Usage

Because scholarly does not use an official API, no key is required. Simply:

import scholarly

print scholarly.search_author('Steven A. Cholewiak').next()

Methods

  • search_author – Search for an author by name and return a generator of Author objects.

>>> search_query = scholarly.search_author('Manish Singh')
>>> print search_query.next()
{'_filled': False,
 'affiliation': u'Rutgers University, New Brunswick, NJ',
 'citedby': 2179,
 'email': u'@ruccs.rutgers.edu',
 'id': '9XRvM88AAAAJ',
 'interests': [u'Human perception',
               u'Computational Vision',
               u'Cognitive Science'],
 'name': u'Manish Singh',
 'url_citations': '/citations?user=9XRvM88AAAAJ&hl=en',
 'url_picture': '/citations/images/avatar_scholar_150.jpg'}
  • search_keyword – Search by keyword and return a generator of Author objects.

>>> search_query = scholarly.search_keyword('Haptics')
>>> print search_query.next()
{'_filled': False,
 'affiliation': u'Stanford University',
 'citedby': 17867,
 'email': u'@cs.stanford.edu',
 'id': '4arkOLcAAAAJ',
 'interests': [u'Robotics', u'Haptics', u'Human Motion'],
 'name': u'Oussama Khatib',
 'url_citations': '/citations?user=4arkOLcAAAAJ&hl=en',
 'url_picture': '/citations/images/avatar_scholar_150.jpg'}
  • search_pubs_query – Search for articles/publications and return generator of Publication objects.

>>> search_query = scholarly.search_pubs_query('The perception of physical stability of 3d objects The role of parts')
>>> print search_query.next()
{'_filled': False,
 'bib': {'abstract': u'Research on 3D shape has focused largely on the perception of local geometric properties, such as surface depth, orientation, or curvature. Relatively little is known about how the visual system organizes local measurements into global shape representations.  ...',
         'author': u'SA Cholewiak and M Singh and R Fleming\u2026',
         'title': u'The perception of physical stability of 3d objects: The role of parts',
         'url': 'http://www.journalofvision.org/content/10/7/77.short'},
 'id_scholarcitedby': '8373403526432059892',
 'source': 'scholar',
 'url_scholarbib': '/scholar.bib?q=info:9HH8oSRONHQJ:scholar.google.com/&output=citation&hl=en&ct=citation&cd=0'}

Example

Here’s a quick example demonstrating how to retrieve an author’s profile then retrieve the titles of the papers that cite his most popular (cited) paper.

>>> # Retrieve the author's data, fill-in, and print
>>> search_query = scholarly.search_author('Steven A Cholewiak')
>>> author = search_query.next().fill()
>>> print author

>>> # Print the titles of the author's publications
>>> print [pub.bib['title'] for pub in author.publications]

>>> # Take a closer look at the first publication
>>> pub = author.publications[0].fill()
>>> print pub

>>> # Which papers cited that publication?
>>> print [citation.bib['title'] for citation in pub.citedby()]

License

The original code that this project was forked from was released by Bello Chalmers under a WTFPL license. In keeping with this mentality, all code is released under the Unlicense.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scholarly-0.1.2.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file scholarly-0.1.2.tar.gz.

File metadata

  • Download URL: scholarly-0.1.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for scholarly-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d55ecf1ed56866a12f35ded2be72e4e550954c2840bd3ae2f8c9966dee6c4fec
MD5 c35160c66c99baabc0435dcd3e7cb483
BLAKE2b-256 81704d13cd62972ff228da47f6101b3f54b7681611a2e40c5ee164c0b66cd988

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page