-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Feature proposal for ticker.calendar #1712
Feature proposal for ticker.calendar #1712
Conversation
I can't think of a fundamentally better way. If it's too easy, users will spam-fetch entire table. So just normal feedback:
Update: |
If you're concerned with reducing the first fetch because of A. problems with users abusing the API or B. performance, then I have two things to say
If on the other hand you'd like to have this as a handy feature, then we could have a separate method for that, that's for sure |
I think this is a fair implementation, although I would much rather hit the endpoint that provides JSON data instead of having to parse the entire HTML. |
Fair points, the implementation is fine. But naming. ICYMI: |
|
I think we're thinking the same thing, so go ahead. Just copy over the post-fetch formatting. |
e4b0116
to
1eea373
Compare
Tests are passing and I think you'll be satisfied with the naming convention. Something to notice is that I deleted some of the unused properties. |
I was hoping you would preserve the API and just replace internals of Line 138 in 5b1605b
Also, technically you aren't returning earnings but EPS. |
I apologize for my absence but I had to take some time off. I will close this PR and open a new one without disregarding the existing api and by properly deprecating the current implementation |
Feature proposal
This is a feature proposal for
Ticker.calendar
. the table is scraped fromhttps://finance.yahoo.com/calendar/earnings?symbol=<ticker>
, since the calendar is an html table, we can parse that withpandas.read_html
Usage
I am somewhat skeptical about the way I structured the calendar API, better suggestions to handle
get_next
are welcomewhen
get_next
, which calls_get_calendar
raises aValueError
then we know that there are not tables to be parsed.In the example above if
get_next()
reaches the end of the earnings list, then we keep returning the last batch