mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-08 01:42:51 +02:00
Update locationdata_eu.py
This commit is contained in:
@@ -18,9 +18,8 @@ def get_govUK_alerts():
|
||||
soup = bs.BeautifulSoup(response.text, 'html.parser')
|
||||
# the alerts are in <h2 class="govuk-heading-m" id="alert-status">
|
||||
alert = soup.find('h2', class_='govuk-heading-m', id='alert-status')
|
||||
|
||||
if alert:
|
||||
return alert.text
|
||||
return alert.get_text(strip=True)
|
||||
else:
|
||||
return "No alerts"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user