Closed agastya29 closed 3 years ago
Same here... API is returning None...
Can the creator please solve?
same over here
Same problem here. The way yahoo formats their data seems to have changed. I'm getting None for every request I make. A few days ago everything worked like a charm.
hi,
So I found some time to go through the source code and how Yahoo Finance pages show the data. When I wrote my own version of YahooFinanceETL, I could get the data from Yahoo Finance like before. On comparing with YahooFInanceETL code, I can clearly see the same approach- using requests & bs4 using the same markers and regex statements, broadly speaking. The change required is minor which I am so far unable to pin point, mainly due to lack of time. For the original author, it should be 5-10min job max. Hope it helps. As a temporary fix, especially if you are looking for a limited number of fields, my suggestion is to write down a simple alternate to YahooFInanceETL and let YahooFinancials class inherit from that class. It works pretty much like the original. In case someone is lost, please go through the source code of YahooFinancials and YahooFinanceETL using the module 'inspect'. Hope it helps till the problem is fixed. Good Luck.
Same problem here, hopefully it will be resolved soon
I have also the same problem. I can get historical data for any stock till 6th of March, since then all I get is None. Hope the info helps to solve the problem.
I have also the same problem. I can get historical data for any stock till 6th of March, since then all I get is None. Hope the info helps to solve the problem.
Please check again. Historical prices are working for me even now.
For me it is still None. When the problem started I ran my program several times and sometimes I got "None" and some times I got the stock price. Now it is only "None".
I have also the same problem. I can get historical data for any stock till 6th of March, since then all I get is None. Hope the info helps to solve the problem.
Please check again. Historical prices are working for me even now.
Hi, did the original start working again? For me it is still "None" in the response
Since this issue seems not to be solved anytime soon I migrated to using this library . It works pretty well, although it had a small bug - but this one has a solution already (which can really be fixed in less than a minute be anyone).
All key statistics still gives None. Do the developer plan to fix this issue?
The issue is likely due to the client version. Fixed in my version, but there is also a slight change in API compared to this version -- mine always returns a dict as if you had requested multiple tickers.
The issue is likely due to the client version. Fixed in my version, but there is also a slight change in API compared to this version -- mine always returns a dict as if you had requested multiple tickers.
This worked for me. However for me the comment "yahoo issue was the client version" wasn't completely clear as to how to fix. So I thought I'd add a comment if others were in the same boat.
Line 71 needs to change from:
version = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
to this:
version = 'w3m/0.5.3+git20180125'
Thanks sylvandb.
The issue is likely due to the client version. Fixed in my version, but there is also a slight change in API compared to this version -- mine always returns a dict as if you had requested multiple tickers. https://github.com/sylvandb/yahoofinancials/
This worked for me. However for me the comment "yahoo issue was the client version" wasn't completely clear as to how to fix. So I thought I'd add a comment if others were in the same boat.
Line 71 needs to change from:
version = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
to this:
version = 'w3m/0.5.3+git20180125'
Thanks sylvandb.
Hi, I do not understand. Is there a need to change the library or do I need to do something with the version in my code?
Thanks, Christer
You fix one line in your code.
Find the yahoofinancials package on your system, (mine is in the site-packages area of my python installation) then make the change in the file named init.py, which should be the only file in the yahoofinancials directory.
Alternatively you could install sylvandb's fork of this codebase (follow his link above). For me, it was easier to fix the one line.
Sorry, the comment system took off the underscores in the filename, I guess they are special characters. The file you modify is named __init__.py
Sorry, the comment system took off the underscores in the filename, I guess they are special characters. The file you modify is named
__init__.py
.. and just by magic it starts to work!
Thanks, Christer
The issue is likely due to the client version. Fixed in my version, but there is also a slight change in API compared to this version -- mine always returns a dict as if you had requested multiple tickers. https://github.com/sylvandb/yahoofinancials/
This worked for me. However for me the comment "yahoo issue was the client version" wasn't completely clear as to how to fix. So I thought I'd add a comment if others were in the same boat.
Line 71 needs to change from:
version = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
to this:
version = 'w3m/0.5.3+git20180125'
Thanks sylvandb.
worked for me. thanks.
stock = YahooFInancials('ABB.BO') cmp = stock.get_current_price() cmp
returns None
Also happening with atleast volumes and market cap fields as well.