Skip to content
Snippets Groups Projects
Commit 61ee46eb authored by fmk17's avatar fmk17
Browse files

Add user-agent bypass

parent 0504e191
Branches
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ def get_location_days(
):
return cached_responses[location]
response = requests.get(location.url)
response = requests.get(location.url, headers={'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0'})
soup = BeautifulSoup(response.text, "lxml")
post = soup.select_one("#post div:nth-child(3)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment