-
Notifications
You must be signed in to change notification settings - Fork 87
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
I couldn't download stocks #43
Comments
Yes! You are right. The API probably changed. |
I looked a bit around on google finance and could not find a GUI to list symbols using a search string. It could be they (re)moved it. If it is removed this utility can't do it's job and is rendered useless. If anyone known of a api to find a list of stocks please say so. |
So basically the unofficial Yahoo API broke, and I'm not yet sure if there is a replacement. |
@Benny- In fact it can be pared down to simply: https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=aa ...and it will still work. However, this only returns the first 10 results. I'm not clear on whether there are parameters to increase the page size or even choose a page other than 1. Any ideas? |
This is great! Do you know where this api is used, @jharker ? If it supports pagination this will be a suitable replacement. |
Hi, @Benny- Yup, the API is used by the "Symbol Lookup" tool on this page: https://finance.yahoo.com/lookup/ But unfortunately, from what I can tell it doesn't support pagination. Still, it seems like it should be possible to use this to pull symbols in groups of ten or less using a few modifications to the search algorithm you're already using. I'll see if I have time to give it a shot in the next week or so. |
Hi, @Benny- I created a pull request that implements the new Yahoo API. You may want to modify this to be more seamlessly integrated into the old code -- I didn't want to rip too much out of the existing code so I created some parallel functionality instead. I've tested this over the past few days and it works pretty well. I wish there was a way to make it more efficient in terms of the number of API calls, but with the API results set apparently limited to 10 and not paginated, I can't figure out a way to do it more efficiently than this. https://github.com/Benny-/Yahoo-ticker-symbol-downloader/pull/44 |
I ran it and I'm am quite impressed with the results so far. It got 84464 unique results so far. Exporting still works and considering the other API did not work anymore I've published this right now as 3.0.0. This new version gives a lot of random 404 error from Yahoo, this is logged as #45. |
root@bad:~# YahooTickerDownloader.py stocks
Checking if we can resume a old download session
Downloader found on disk, resuming
Downloading stocks
req https://finance.yahoo.com/_finance_doubledown/api/resource/finance.yfinlist.symbol_lookup;p=1;s=a;b=0;m=all;t=S?device=console&returnMeta=true
Retry attempt: 1. Sleep period: 5 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/finance.yfinlist.symbol_lookup;p=1;s=a;b=0;m=all;t=S?device=console&returnMeta=true
Retry attempt: 2. Sleep period: 25 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/finance.yfinlist.symbol_lookup;p=1;s=a;b=0;m=all;t=S?device=console&returnMeta=true
Retry attempt: 3. Sleep period: 125 seconds.
I think that url does not work.
That response is below.
{"output":{"message":"Not Found"},"meta":{}}
Thank you
The text was updated successfully, but these errors were encountered: