Welcome to the Google Scholar Scraper Python Library! This library is designed to help researchers retrieve citation information from Google Scholar legally and efficiently. The primary aim is to assist fellow researchers in obtaining citation data for their papers of interest without relying on expensive platforms.
- Description: This function inspects the Google Scholar page visited by the
scrape()
function and detects the presence of a captcha. If a captcha is detected, the execution pauses until the user manually solves the captcha.
- Description: This function should be called first by the user. It takes a PubMed ID as input and retrieves the Google Scholar URL for the corresponding paper.
- Description: This function pauses the execution of the program for a random time between 5 to 10 seconds. This randomization helps avoid triggering Google Scholar's bot checker.
- Description: The main function of the library. It returns the number of citations that the specified paper has on Google Scholar.
To use this library, follow these steps:
- Install the library using
pip install google_scholar_scraper
. - Import the library in your Python script.
- Use the functions described above to retrieve citation data.
from google_scholar_scraper import check_captcha, get_paper_url, pause_for_one_minute, scrape
# Example Usage
pubmed_id = "12345678"
paper_url = get_paper_url(pubmed_id)
citations = scrape(paper_url)
print(f"The paper with PubMed ID {pubmed_id} has {citations} citations on Google Scholar.")
This is the first version of the library. We are committed to making it more useful by integrating additional features. If you have suggestions or encounter any issues, please feel free to open an issue on GitHub.
We welcome contributions to enhance the functionality of this library. If you have ideas for new features or improvements, don't hesitate to open a pull request.
This library is licensed under the MIT License - see the LICENSE.md file for details.
Abhishek Sharma, https://github.com/sabhi-29
Sharma A, GS_Scrapper, Github https://github.com/tseemann/abricathttps://github.com/ajlopatkin/GS_Scrapper
Happy researching!