Coder Social home page Coder Social logo

tanjh100 / scholarly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scholarly-python-package/scholarly

0.0 2.0 0.0 293 KB

Retrieve author and publication information from Google Scholar in a friendly, Pythonic way

License: The Unlicense

Python 100.00%

scholarly's Introduction

scholarly

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

Usage

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

import scholarly

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

Methods

  • search_author -- Search for an author by name and return a generator of Author objects.
>>> search_query = scholarly.search_author('Manish Singh, Rutgers')
>>> print(next(search_query))
{'_filled': False,
 'affiliation': 'Rutgers University, New Brunswick, NJ',
 'citedby': 3349,
 'email': '@ruccs.rutgers.edu',
 'id': '9XRvM88AAAAJ',
 'interests': ['Human perception', 'Computational Vision', 'Cognitive Science'],
 'name': 'Manish Singh',
 'url_picture': '/citations/images/avatar_scholar_56.jpg'}
  • search_keyword -- Search by keyword and return a generator of Author objects.
>>> search_query = scholarly.search_keyword('Haptics')
>>> print(next(search_query))
{'_filled': False,
 'affiliation': 'Stanford University',
 'citedby': 27493,
 'email': '@cs.stanford.edu',
 'id': '4arkOLcAAAAJ',
 'interests': ['Robotics', 'Haptics', 'Human Motion'],
 'name': 'Oussama Khatib',
 'url_picture': '/citations/images/avatar_scholar_56.jpg'}
  • search_pubs_query -- Search for articles/publications and return generator of Publication objects.
>>> search_query = scholarly.search_pubs_query('Perception of physical stability and center of mass of 3D objects')
>>> print(next(search_query))
{'_filled': False,
 'bib': {'abstract': 'Humans can judge from vision alone whether an object is '
                     'physically stable or not. Such judgments allow observers '
                     'to predict the physical behavior of objects, and hence '
                     'to guide their motor actions. We investigated the visual '
                     'estimation of physical stability of 3-D objects (shown '
                     'in stereoscopically viewed rendered scenes) and how it '
                     'relates to visual estimates of their center of mass '
                     '(COM). In Experiment 1, observers viewed an object near  '
                     '...',
         'author': 'SA Cholewiak and RW Fleming and M Singh',
         'eprint': 'https://scholar.google.comhttp://jov.arvojournals.org/article.aspx?articleid=2213254',
         'title': 'Perception of physical stability and center of mass of 3-D '
                  'objects',
         'url': 'http://jov.arvojournals.org/article.aspx?articleid=2213254'},
 'citedby': 11,
 'id_scholarcitedby': '15736880631888070187',
 'source': 'scholar',
 'url_scholarbib': 'https://scholar.googleusercontent.com/scholar.bib?q=info:K8ZpoI6hZNoJ:scholar.google.com/&output=citation&scisig=AAGBfm0AAAAAWd6hKRFtJYWRGnEISlb66w7vWCe_mTBq&scisf=4&ct=citation&cd=0&hl=en'}

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 = next(search_query).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.get_citedby()])

Installation

Use pip to install from pypi:

pip install scholarly

or pip to install from github:

pip install git+https://github.com/OrganicIrradiation/scholarly.git

or clone the package using git:

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

Requirements

Requires arrow, Beautiful Soup, bibtexparser, and requests[security].

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.

scholarly's People

Contributors

organicirradiation avatar 1ucian0 avatar firefly-cpp avatar utf avatar percolator avatar spferical avatar cako avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.