-
Notifications
You must be signed in to change notification settings - Fork 88
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
401 Unauthorized / 404 Not Found / Cannot iterate over null #37
Comments
tried that version and same jq error. |
I know nothing, but I edited ticker.sh and changed line API_ENDPOINT, and replaced "v7" with "v6", and that appears to return a result; I guess I just got lucky. |
Interesting. Will test things later. I‘m currently undecided what to do next. Last time the problem went away. |
i just made it v6 and that worked |
released a new version using v6. thanks folks! |
It looks like the workaround using v6 stopped working. acquire-yahoo-finance-session is probably the way to go. |
Do you know if acquiring crumbs and cookies for the v6 url works? Or is it only working for v7? Because if this isn't a crumb / cookie issue with v6, maybe they're just having problems in the backend and will most likely be fixed when the Yahoo team is awake. |
Yeah, I'm definitely waiting before releasing a fix. |
I didn't look at the code, but as far as I know https://github.com/premnirmal/StockTicker also uses Yahoo data and it is still working. Might be worthwhile to take a look there. It was broken just like this script last month when the issue first surfaced. Maybe they figured out some fix. |
Just merged #39 |
With this change it is working for me now. I am in south america. |
fixed for me as well |
Not fixed for me, as expected :) I'm still troubled by georestriction issue. Let me know if you have any idea how I could help. |
It still doesn't work for me. I cannot get file crump.txt, ticker.sh script fetch "Server error 500" (long file with css, etc to show error 500). When I try in my browser, I get code, like "C5CDSr9vMve", I assume that something like this should be in crump.txt. When I examine cookies.txt, I see just one entry, like I run Linux and I am in EU... |
Still no solution for me: I run Linux Mint 21 and I am in the EU too |
working for me here in US. |
working for me in Australia. |
I was experiencing similar issues being reported here and on #33 Symptoms are that:
After looking around a bit and reading this StackOverflow answer I noticed it suggests using https://fc.yahoo.com/ instead of https://finance.yahoo.com/ to get the cookie. I tried simply changing that url on ticker.sh (and deleting the cached cookie/crumbs with index f2ffe6c..a84f5a1 100755
--- a/ticker.sh
+++ b/ticker.sh
@@ -38,7 +38,7 @@ fields=$(IFS=,; echo "${FIELDS[*]}")
[ ! -d "$SESSION_DIR" ] && mkdir -m 700 "$SESSION_DIR"
preflight () {
- curl --silent --output /dev/null --cookie-jar "$COOKIE_FILE" "https://finance.yahoo.com" \
+ curl --silent --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 -b "$COOKIE_FILE" "https://query1.finance.yahoo.com/v1/test/getcrumb" \
> "$CRUMB_FILE" I don't know how reliable this is going to be in the long term, as I am not sure if yahoo makes any guarantee about this url not redirecting, but it seem to be an effective workaround for now and I just thought it would be worth sharing it. cc @pstadler |
@giuli007 wow, this is great! would you mind opening a PR? |
Awesome, thanks a lot! @tomaszg7 @PSLLSP @jeandupont314 could you please confirm whether the fix in #42 is working for you? |
It is. I just had to remember to delete old /tmp/ticker* which kept broken cookie from previous runs. |
It works again, thanks! |
Anyone getting this again ? |
I was getting empty output again, had to remove manually |
I am getting this again, inside /tmp/ticker.sh-username/crumb.txt I get "Too Many Requests" |
the same thing happens here too... and I am getting empty output |
Here we go again.
More information in #33. Fix available in branch acquire-yahoo-finance-session
The text was updated successfully, but these errors were encountered: