- Saved searches
- Use saved searches to filter your results more quickly
- License
- scholarly-python-package/scholarly
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- scholarly
- Installation
- Optional dependencies
- Tests
- Documentation
- Examples
- Disclaimer
- Contributing
- Acknowledging scholarly
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Retrieve author and publication information from Google Scholar in a friendly, Pythonic way without having to worry about CAPTCHAs!
License
scholarly-python-package/scholarly
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
scholarly is a module that allows you to retrieve author and publication information from Google Scholar in a friendly, Pythonic way without having to solve CAPTCHAs.
scholarly can be installed either with conda or with pip . To install using conda , simply run
conda install -c conda-forge scholarly
Alternatively, use pip to install the latest release from pypi:
or pip to install from github:
pip3 install -U git+https://github.com/scholarly-python-package/scholarly.git
We are constantly developing new features. Please update your local package regularly. scholarly follows Semantic Versioning. This means your code that uses an earlier version of scholarly is guaranteed to work with newer versions.
- Tor: scholarly comes with a handful of APIs to set up proxies to circumvent anti-bot measures. Tor methods are deprecated since v1.5 and are not actively tested or supported. If you wish to use Tor, install scholarly using the tor tag as
pip3 install scholarly[tor]
pip3 install scholarly'[tor]'
To check if your installation is succesful, run the tests by executing the test_module.py file as:
python3 -m unittest -v test_module.py
from scholarly import scholarly # Retrieve the author's data, fill-in, and print # Get an iterator for the author results search_query = scholarly.search_author('Steven A Cholewiak') # Retrieve the first result from the iterator first_author_result = next(search_query) scholarly.pprint(first_author_result) # Retrieve all the details for the author author = scholarly.fill(first_author_result ) scholarly.pprint(author) # Take a closer look at the first publication first_publication = author['publications'][0] first_publication_filled = scholarly.fill(first_publication) scholarly.pprint(first_publication_filled) # Print the titles of the author's publications publication_titles = [pub['bib']['title'] for pub in author['publications']] print(publication_titles) # Which papers cited that publication? citations = [citation['bib']['title'] for citation in scholarly.citedby(first_publication_filled)] print(citations)
IMPORTANT: Making certain types of queries, such as scholarly.citedby or scholarly.search_pubs , will lead to Google Scholar blocking your requests and may eventually block your IP address. You must use proxy services to avoid this situation. See the «Using proxies» section in the documentation for more details. Here’s a short example:
from scholarly import ProxyGenerator # Set up a ProxyGenerator object to use free proxies # This needs to be done only once per session pg = ProxyGenerator() pg.FreeProxies() scholarly.use_proxy(pg) # Now search Google Scholar from behind a proxy search_query = scholarly.search_pubs('Perception of physical stability and center of mass of 3D objects') scholarly.pprint(next(search_query))
scholarly also has APIs that work with several premium (paid) proxy services. scholarly is smart enough to know which queries need proxies and which do not. It is therefore recommended to always set up a proxy in the beginning of your application.
The developers use ScraperAPI to run the tests in Github Actions. The developers of scholarly are not affiliated with any of the proxy services and do not profit from them. If your favorite service is not supported, please submit an issue or even better, follow it up with a pull request.
We welcome contributions from you. Please create an issue, fork this repository and submit a pull request. Read the contributing document for more information.
If you have used this codebase in a scientific publication, please cite this software as following:
@softwarecholewiak2021scholarly, author = Cholewiak, Steven A. and Ipeirotis, Panos and Silva, Victor and Kannawadi, Arun>, title = >, year = 2021>, doi = 10.5281/zenodo.5764801>, license = Unlicense>, url = https://github.com/scholarly-python-package/scholarly>, version = 1.5.1> >
The original code that this project was forked from was released by Luciano Bello under a WTFPL license. In keeping with this mentality, all code is released under the Unlicense.
About
Retrieve author and publication information from Google Scholar in a friendly, Pythonic way without having to worry about CAPTCHAs!
scholarly
scholarly is a module that allows you to retrieve author and publication information from Google Scholar in a friendly, Pythonic way without having to solve CAPTCHAs.
Installation
scholarly can be installed either with conda or with pip . To install using conda , simply run
conda install -c conda-forge scholarly
Alternatively, use pip to install the latest release from pypi:
or pip to install from github:
pip3 install -U git+https://github.com/scholarly-python-package/scholarly.git
We are constantly developing new features. Please update your local package regularly. scholarly follows Semantic Versioning. This means your code that uses an earlier version of scholarly is guaranteed to work with newer versions.
Optional dependencies
- Tor: scholarly comes with a handful of APIs to set up proxies to circumvent anti-bot measures. Tor methods are deprecated since v1.5 and are not actively tested or supported. If you wish to use Tor, install scholarly using the tor tag as
Tests
To check if your installation is succesful, run the tests by executing the test_module.py file as:
python3 -m unittest -v test_module.py
Documentation
Examples
IMPORTANT: Making certain types of queries, such as scholarly.citedby or scholarly.search_pubs , will lead to Google Scholar blocking your requests and may eventually block your IP address. You must use proxy services to avoid this situation. See the "Using proxies" section in the documentation for more details. Here's a short example:
scholarly also has APIs that work with several premium (paid) proxy services. scholarly is smart enough to know which queries need proxies and which do not. It is therefore recommended to always set up a proxy in the beginning of your application.
Disclaimer
The developers use ScraperAPI to run the tests in Github Actions. The developers of scholarly are not affiliated with any of the proxy services and do not profit from them. If your favorite service is not supported, please submit an issue or even better, follow it up with a pull request.
Contributing
We welcome contributions from you. Please create an issue, fork this repository and submit a pull request. Read the contributing document for more information.
Acknowledging scholarly
If you have used this codebase in a scientific publication, please cite this software as following:
> The original code that this project was forked from was released by Luciano Bello under a WTFPL license. In keeping with this mentality, all code is released under the Unlicense.