diff --git a/yahoo_earnings_calendar/scraper.py b/yahoo_earnings_calendar/scraper.py index 09412ba..93748b1 100644 --- a/yahoo_earnings_calendar/scraper.py +++ b/yahoo_earnings_calendar/scraper.py @@ -33,7 +33,7 @@ def __init__(self, delay=SLEEP_BETWEEN_REQUESTS_S): def _get_data_dict(self, url): time.sleep(self.delay) - page = requests.get(url) + page = requests.get(url, headers={'User-Agent': 'Custom'}) page_content = page.content.decode(encoding='utf-8', errors='strict') page_data_string = [row for row in page_content.split( '\n') if row.startswith('root.App.main = ')][0][:-1]