diff --git a/README.md b/README.md index 5acb306..aac489c 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 ``` diff --git a/yahoo_earnings_calendar/__init__.py b/yahoo_earnings_calendar/__init__.py index 7342b52..a025825 100644 --- a/yahoo_earnings_calendar/__init__.py +++ b/yahoo_earnings_calendar/__init__.py @@ -1 +1 @@ -from scraper import YahooEarningsCalendar +from .scraper import YahooEarningsCalendar diff --git a/yahoo_earnings_calendar/scraper.py b/yahoo_earnings_calendar/scraper.py index 75ab208..f48de25 100644 --- a/yahoo_earnings_calendar/scraper.py +++ b/yahoo_earnings_calendar/scraper.py @@ -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'))