Scrapes data from Yahoo! Finance earnings calendar
Project description
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
# Returns the next earnings date of BOX in Unix timestamp
print(yec.get_next_earnings_date('box'))
# 1508716800
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for yahoo_earnings_calendar-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a034de5ac24b0ed24a877646f47319a4d25a75f194aeb9fd1f21a21b266a4ee1 |
|
MD5 | a4cf174626bed070b53b67ad76b28f71 |
|
BLAKE2b-256 | c3c88f77a9e2723e2cbdd70d27a5fd0561d50af21223f2c883e185d65b87e7da |
Close
Hashes for yahoo_earnings_calendar-0.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c80f865f0ca675e4886b94f364c9ceb715915415f3d3487dcc4fef81e92a1e13 |
|
MD5 | 8ce2ce04d644cdf2e6a15300081fd178 |
|
BLAKE2b-256 | 96d0951191162f7d63ec62a9a3bd9c94ac28dbdd214299ecd286b3899ad60ef0 |