Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while requesting from Google Scholar (Error: Request failed with status code 429) #20

Open
amcc1996 opened this issue Sep 8, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@amcc1996
Copy link

amcc1996 commented Sep 8, 2020

splurt throws the following error while running data command (see the full output here)

$ splurt data -p project.yaml
>> Error: Request failed with status code 429

Fetching from Scopus runs normally.

splurt fetch -p project.yaml

The contents from porject.yaml are derived from the example in the documentation:

sqlite: articles.db

fetch:
  query: 'data AND google'
  databases: [scopus]
  maximum: 1
  scopus: Here I inserted by SCOPUS_API_KEY

exclude:
  # SQL like WHERE using these columns: id, doi, title, year, authors, publication, 
  # type, origin, cites, abstract, link, bibtex
  criteria: ['cites = 0','year < 2000']

data:
  delay: 10
  cookie: "LM=1599585071:S=40CQ9rvXrNpRCV5f"

export:
  # id, doi, title, year, authors, publication, 
  # type, origin, cites, abstract, link, bibtex
  data: [title, doi, year, cites, abstract]
  # if the format is html, the data attribute is ignored
  format: csv # can be csv,json,table,html
  # if scihub is specified, available pdfs will be downloaded
  # requires the (doi attribute)
  scihub: 'https://sci-hub.se/' # current sci-hub valid url

The problem seems to be associated with the cookie attribute. I followed the documentation to get the cookie value using Mozilla Firefox:

  1. Opened Google Scholar in a private window
  2. Opened current cookies with Shift + F9
  3. Copied the value of GSP cookie (which I noticed that changed from one attempt to another)

The documentation is very explanatory and easy to follow so I have repeated these steps several times but cannot understand what is happening. Any thought on why this is occurring?

Disclaimer: I am completely new to splurt, so this might not even be a true issue but simple misuse

@amcc1996
Copy link
Author

amcc1996 commented Sep 8, 2020

Apparently, this has been noticed before. See #7.

@arestivo arestivo added the bug Something isn't working label Sep 9, 2020
@arestivo arestivo self-assigned this Sep 9, 2020
@arestivo
Copy link
Owner

arestivo commented Sep 9, 2020

Thanks for the bug report.

Status code 429 is a rate limiting error: "Too many requests". But it also might just be that Google changed something. I'll check it out as soon as possible.

@Gropi
Copy link

Gropi commented Mar 16, 2023

Is there any solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants