Skip to content

Commit b233950

Browse files
committed
fix: Runnymede Borough Council
fix: #1513
1 parent fc05b2d commit b233950

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

uk_bin_collection/uk_bin_collection/councils/RunnymedeBoroughCouncil.py

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

24+
headers = {
25+
"Origin": "https://www.runnymede.gov.uk",
26+
"Referer": "https://www.runnymede.gov.uk",
27+
"User-Agent": "Mozilla/5.0",
28+
}
29+
2430
URI = f"https://www.runnymede.gov.uk/homepage/150/check-your-bin-collection-day?address={user_uprn}"
2531

2632
# Make the GET request
27-
response = requests.get(URI)
33+
response = requests.get(URI, headers=headers)
2834

2935
soup = BeautifulSoup(response.text, "html.parser")
3036

0 commit comments

Comments
 (0)