Giter Club home page Giter Club logo

google-scholar-scraper's Introduction

Google Scholar Scraper

GitHub repo status GitHub license GitHub contributors GitHub tag (latest by date) GitHub repo size

Unfortunately, Google Scholar does not support exporting results... I needed the most cited papers for a research project, and after trying an imperfect script I decided to write my own.

Important note: The spiders don't send more than 2 requests per second to Google Scholar. The reason is that we don't like to solve the CAPTCHA, so it's better to wait a little and acting like a human. Changing IP address sometimes is a good idea... ๐Ÿ˜ฉ

Features

  • Supports multiple languages
  • Customizable date range
  • Sorts by number of citations
  • Sorts by year
  • Searches for articles
  • Searches for case law
  • Searches in a profile by ID
  • Graphical interface

A shocked skeleton

Usage

Install the dependencies:

pip install -r requirements.txt

Run the scraper just by typing the keyword:

python core.py "cryptography"

Customize the date range:

python core.py "metaverse" -s 1997 -e 2018

Limit the languages to one or more:

python core.py "medical" -l en es zh-tw fr

Set the output file path:

python core.py "machine learning" -s 2002 -o exports/most_cited_ml_articles_since_2002.csv

Sort the output by year:

python core.py "oceanography" -y

Search for case law:

python core.py "privacy" -c

Get a specific profile articles by the user ID:

python core.py "nms69lqaaaaj" -p -o jeff_dean_articles.csv

Make the program quiet:

python core.py "philosophy" -e 1234 -q

Here is some example exports to see if the scraper meets your needs or not!

License

This project is licensed under the MIT license found in the LICENSE file in the root directory of this repository.

google-scholar-scraper's People

Contributors

sheikhartin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

google-scholar-scraper's Issues

The tags version are not correct

The versions have jumped from 0.2.0 to 2.0.0, but it should be 1.0.0 after the update to support profiles...

Note: This issue was opened by the programmer after replacing version 2.0.0 with 1.0.0. I decided to say this so that if you look at the history of commits, you will not be afraid to change the labels.

Screenshot 2022-06-19 at 08-41-32 Tags ยท sheikhartin google-scholar-scraper

Check out this question on Stack Overflow to learn how to replace remote tag with Git.

Error: IndexError: list index out of range

Thanks in advance, this is such a helpful app, would love to have this one bug fixed.

Sometimes when I search it gives me this error. Even when I run the most basic search: python core.py "Covid"
All dependencies were installed successfully with: pip install -r requirements.txt . Running Ubuntu 22.04.2 Locally.

If you could also advise the best way to search for 2 keywords at once: Would it be "keyword1" "keyword 2" or "keyword1 keyword2" or otherwise in the prompt. Thanks.

Bash Prompt Used When Error Appears: python3 core.py "cbd covid" -s 2022 -e 2023

Fetching request #18 from https://scholar.google.com/scholar?start=170&q=cbd+covid&hl=en&lr=lang_en&as_sdt=0,5&as_ylo=2020&as_yhi=2023
Traceback (most recent call last):
File "/home/agentgpt/google-scholar-scraper/core.py", line 234, in
results = pd.DataFrame(gs_spider.fetch())
File "/home/agentgpt/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 711, in init
data = list(data)
File "/home/agentgpt/google-scholar-scraper/core.py", line 62, in fetch
for item in self.parse(response):
File "/home/agentgpt/google-scholar-scraper/core.py", line 98, in parse
year = re.search(r'\d{4,}$', snippet[-2]) or re.search(r'\d{4,}$', snippet[-1])
IndexError: list index out of range

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.