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

Too Many Requests #43

Closed
jman223 opened this issue Jul 26, 2023 · 5 comments
Closed

Too Many Requests #43

jman223 opened this issue Jul 26, 2023 · 5 comments

Comments

@jman223
Copy link

jman223 commented Jul 26, 2023

Running the script has failed for the past couple of days.

crumb.txt says "Too Many Requests".

I thought my IP may have been banned, so I tried via an Amazon AWS server and received the same result.

@jman223
Copy link
Author

jman223 commented Jul 26, 2023

Adding the following to curl resolves the issue:

-A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0"

@jman223 jman223 closed this as completed Jul 26, 2023
@phish0r
Copy link

phish0r commented Jul 28, 2023

I'm also running into Too Many Requests. No errors from the script itself, just no output. When I check my crumb.txt file, I have the Too Many Requests error message. I attempted to do the workaround you suggested, but it didn't work for me.

@jman223
Copy link
Author

jman223 commented Jul 28, 2023

I didn't test this extensively, so not sure if both are required, but I added to both curl commands in the preflight function.

AGENT="Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0"

preflight () {
  # rather than "finance", use the "fc" subdomain which doesn't redirect to a consent page
  curl --silent -A "$AGENT" --output /dev/null --cookie-jar "$COOKIE_FILE" "https://fc.yahoo.com" \
  -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
  curl --silent -A "$AGENT" -b "$COOKIE_FILE" "https://query1.finance.yahoo.com/v1/test/getcrumb" \
    > "$CRUMB_FILE"
}

@jman223 jman223 reopened this Jul 28, 2023
@phish0r
Copy link

phish0r commented Jul 29, 2023

Well, that didn't work but what did was switching connections over to my mobile hotspot, then connecting back to my Wifi. Not sure why that worked, but it did.

@jman223 jman223 closed this as completed Jul 29, 2023
@pstadler
Copy link
Owner

pstadler commented Aug 2, 2023

-> #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants