Skip to content

Commit

Permalink
Fix Salford_gov_uk source (mampfes#3221)
Browse files Browse the repository at this point in the history
* Fix Salford_gov_uk source

* reformatting

---------

Co-authored-by: 5ila5 <[email protected]>
  • Loading branch information
FilHarr and 5ila5 authored Dec 18, 2024
1 parent 729549e commit e1d6840
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ def __init__(self, uprn: int):
self._uprn = uprn

def fetch(self):
url = "https://www.salford.gov.uk/bins-and-recycling/bin-collection-days/your-bin-collections/"
params = {"UPRN": self._uprn}
r = requests.get(
"https://www.salford.gov.uk/bins-and-recycling/bin-collection-days/your-bin-collections/",
params=params,
)
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
}

r = requests.get(url, params=params, headers=headers)
r.raise_for_status()

soup = BeautifulSoup(r.text, features="html.parser")
results = soup.find_all("div", {"class": "col-xs-12 col-md-6"})
results = soup.find_all("div", {"class": "col-12 col-lg-6"})

entries = []

Expand Down

0 comments on commit e1d6840

Please sign in to comment.