From eae6f0db246464e518ff11dda699c57e3e184bbc Mon Sep 17 00:00:00 2001 From: moshferatu Date: Mon, 4 Dec 2023 05:52:31 -0800 Subject: [PATCH] Update user agent to resolve 403 Forbidden errors --- news/scrape_news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/scrape_news.py b/news/scrape_news.py index 5005b20..0f70a02 100644 --- a/news/scrape_news.py +++ b/news/scrape_news.py @@ -16,7 +16,7 @@ def scrape_news(date: datetime) -> pd.DataFrame: # Set headers to mimic a web browser. headers = { - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" } response = requests.get(url, headers=headers)