We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
calendar_events
dat.calendar_events currently returns the next earnings event, which I assume is same as shown on the quote page https://finance.yahoo.com/quote/AAPL?p=AAPL&.tsrc=fin-srch
dat.calendar_events
But on the Earnings Calendar page https://finance.yahoo.com/calendar/earnings?symbol=AAPL it shows past dates too - these are useful, can they be fetched?
The text was updated successfully, but these errors were encountered:
You have to have a crumb to do this, which from what I remember since the last time I tried, is not easy to do.
crumb
Sorry, something went wrong.
Lots of really cool stuff here though if we can figure out how to get the crumb and add it to the Session.
yahooquery/yahooquery/base.py
Line 824 in 444855e
With a little help from GPT here is code to get the crumb:
import requests, re, json def get_crumb(): response = requests.get("https://finance.yahoo.com") pat = re.compile(r'window\.YAHOO\.context = ({.*?});', re.DOTALL) match = re.search(pat, response.text) if match: js_dict = json.loads(match.group(1)) return js_dict.get('crumb') return None print(get_crumb())
I'm hoping you can integrate this in because I find the codebase hard to navigate. Maybe a "Developers Guide" could be useful.
No branches or pull requests
dat.calendar_events
currently returns the next earnings event, which I assume is same as shown on the quote page https://finance.yahoo.com/quote/AAPL?p=AAPL&.tsrc=fin-srchBut on the Earnings Calendar page https://finance.yahoo.com/calendar/earnings?symbol=AAPL it shows past dates too - these are useful, can they be fetched?
The text was updated successfully, but these errors were encountered: