Skip to content

Commit 3053200

Browse files
committed
fix: Hinckley and Bosworth Borough Council
1 parent 5375210 commit 3053200

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

uk_bin_collection/uk_bin_collection/councils/HinckleyandBosworthBoroughCouncil.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ def parse_data(self, page: str, **kwargs) -> dict:
2020
check_uprn(user_uprn)
2121
bindata = {"bins": []}
2222

23+
headers = {
24+
"Origin": "https://www.hinckley-bosworth.gov.uk",
25+
"Referer": "https://www.hinckley-bosworth.gov.uk",
26+
"User-Agent": "Mozilla/5.0",
27+
}
28+
2329
URI = f"https://www.hinckley-bosworth.gov.uk/set-location?id={user_uprn}&redirect=refuse&rememberloc="
2430

2531
# Make the GET request
26-
response = requests.get(URI)
32+
response = requests.get(URI, headers=headers)
2733

2834
# Parse the HTML
2935
soup = BeautifulSoup(response.content, "html.parser")

0 commit comments

Comments
 (0)