Skip to content

Commit cc6d038

Browse files
committed
fix: Lichfield District Council
fix: 1549
1 parent 0edc373 commit cc6d038

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

uk_bin_collection/uk_bin_collection/councils/LichfieldDistrictCouncil.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ def parse_data(self, page: str, **kwargs) -> dict:
2424
def solve(s):
2525
return re.sub(r"(\d)(st|nd|rd|th)", r"\1", s)
2626

27+
headers = {
28+
"Origin": "https://www.lichfielddc.gov.uk",
29+
"Referer": "https://www.lichfielddc.gov.uk",
30+
"User-Agent": "Mozilla/5.0",
31+
}
32+
2733
URI = f"https://www.lichfielddc.gov.uk/homepage/6/bin-collection-dates?uprn={user_uprn}"
2834

2935
# Make the GET request
30-
response = requests.get(URI)
36+
response = requests.get(URI, headers=headers)
3137

3238
soup = BeautifulSoup(response.text, "html.parser")
3339

0 commit comments

Comments
 (0)