Update user agent to resolve 403 Forbidden errors

This commit is contained in:
moshferatu 2023-12-04 05:52:31 -08:00
parent 90155a703d
commit eae6f0db24

View File

@ -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)