Yahoo! Earnings Calendar Scraper
Scrapes Yahoo! Finance earnings calendar to get data for a specific date or a date range.
Installation
Pip
pip install yahoo_earnings_calendar
Usage
Get earnings date information on a specific date or in a date range
import datetime
from yahoo_earnings_calendar import YahooEarningsCalendar
date_from = datetime.datetime.strptime(
'May 5 2017 10:00AM', '%b %d %Y %I:%M%p')
date_to = datetime.datetime.strptime(
'May 8 2017 1:00PM', '%b %d %Y %I:%M%p')
yec = YahooEarningsCalendar()
print(yec.earnings_on(date_from))
print(yec.earnings_between(date_from, date_to))
Data attributes
- companyshortname: Company Name
- e.g., 20160606
- ticker: Ticker
- e.g., AAPL
- startdatetime: Event Start Time
- e.g., 2017-04-23T21:00:00.000-04:00
- startdatetimetype: Event Start Time Type
- e.g., TAS (Time Not Supplied), AMC (After Market Close )
- epsestimate: EPS Estimate
- epsactual: Reported EPS
- epssurprisepct: Surprise (%)
- gmtOffsetMilliSeconds: GMT Offset in MS
Get the next earnings date of a specific symbol
import datetime
from yahoo_earnings_calendar import YahooEarningsCalendar
yec = YahooEarningsCalendar()
# Returns the next earnings date of BOX in Unix timestamp
print(yec.get_next_earnings_date('box'))
# 1508716800
Get all the available earnings data of a specific symbol
from yahoo_earnings_calendar import YahooEarningsCalendar
yec = YahooEarningsCalendar()
# Returns a list of all available earnings of BOX
print(yec.get_earnings_of('box'))
Set delay between requests
By default, requests are delayed by 1.8 sec to avoid exceeding the 2000/hour rate limit. You can override the default delay by passing an argument to the YahooEarningsCalendar constructor.
import datetime
from yahoo_earnings_calendar import YahooEarningsCalendar
my_custom_delay_s = 0.5
yec = YahooEarningsCalendar(my_custom_delay_s)
Metadata
Release files for yahoo-earnings-calendar 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yahoo_earnings_calendar-0.6.0.tar.gz | 4.0 kB | Without provenance | Details for yahoo_earnings_calendar-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yahoo_earnings_calendar-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for yahoo_earnings_calendar-0.6.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / yahoo_earnings_calendar-0.6.0.tar.gz
| Download URL | yahoo_earnings_calendar-0.6.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4908a3df195257778248fa1e1c4f0d3a30bb33be232cb4d6ee0595f6a0aac21
|
|
BLAKE2b-256 checksum How to use checksums |
0ec3b218141a92bd38da91cf1a2246f3855a308b3810a12a8bd7c50e3e68d78d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
|
Release files / yahoo_earnings_calendar-0.6.0-py3-none-any.whl
| Download URL | yahoo_earnings_calendar-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
923d15646474c5049ff80ef34c5cc69ce2d0158c4cbd44bc15030692faf2946e
|
|
BLAKE2b-256 checksum How to use checksums |
8ec556a980977341b9166284007b2d2f81b6cbdfb643aec71e46994c6d014bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
|
Security for yahoo-earnings-calendar 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.