Update user agent to resolve 403 Forbidden errors
This commit is contained in:
parent
90155a703d
commit
eae6f0db24
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user