Skip to content
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

porting to python3 #13

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ date_from = datetime.datetime.strptime(
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)
print(yec.earnings_on(date_from))
print(yec.earnings_between(date_from, date_to))
```

#### Data attributes
Expand All @@ -42,6 +42,6 @@ print yec.earnings_between(date_from, date_to)
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')
print(yec.get_next_earnings_date('box'))
# 1508716800
```
2 changes: 1 addition & 1 deletion yahoo_earnings_calendar/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from scraper import YahooEarningsCalendar
from .scraper import YahooEarningsCalendar
6 changes: 3 additions & 3 deletions yahoo_earnings_calendar/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def earnings_between(self, from_date, to_date):
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)
print(yec.earnings_on(date_from))
print(yec.earnings_between(date_from, date_to))
# Returns the next earnings date of BOX in Unix timestamp
print yec.get_next_earnings_date('box')
print(yec.get_next_earnings_date('box'))