-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
ASX Data for financials, cashflow and balance does not appear to be scraped correctly. #250
Comments
I'm actually just getting empty dataframes, MSFT included:
|
Hi, |
Hello @mikesinc and @AmareswarReddy, Did you nanage to solve this issue? I'm also getting some incorrect results when scraping financial data. I'm trying to troubleshoot, but no luck so far. Meanwhile, if you want an alternative way of scraping this data, check this article by @mattbutton Cheers! |
I tried to incorporate matt's code on my fork (dev branch) and it seems to be partly working. Some data is getting correctly scraped, but not all of it. Feel free to check it out and improve my code.
Cheers! |
If you want a solution that doesn't involve scraping, you can utilize this endpoint: https://query2.finance.yahoo.com/ws/fundamentals-timeseries/v1/finance/timeseries/{symbol} (replacing symbol with your desired symbol). The endpoint requires a few query parameters though: period1, period2, and type. Check here to see what you can pass to each of those: https://github.com/dpguthrie/yahooquery/blob/master/yahooquery/base.py#L252 |
Thank you, Doug. Your API is the best choice for retrieving financial data from Yahoo, since it can fetch the correct data for almost all the financial statements. I'm validating the data and everything seems to be consistent. |
I have made the fixes as described in #191 such that the financials, cashflow and balance sheet scrapings no longer return empty dataframes, however I am further experiencing an issue to do with the actual data scraped from ASX listings.
Some data appears to be correct (e.g. ticker.info, ticker.history) but some appears to not match the Yahoo Finance page. See below example of WPL.AX financials:
Compared to the DataFrame output from ticker.financials:
import yfinance as yf
print(yf.Ticker("WPL.AX").financials)
Result:
It seems to work when I try the ticker "MSFT" but not for my ASX listings.
Has anyone had this issue or know what is going wrong?
The text was updated successfully, but these errors were encountered: