Proper fix for BOTA alerts

This commit is contained in:
Ian Renton
2026-01-18 12:47:34 +00:00
parent 261912b6e1
commit 33bdcca990

View File

@@ -20,9 +20,11 @@ class BOTA(HTTPAlertProvider):
new_alerts = []
# Find the table of upcoming alerts
bs = BeautifulSoup(http_response.content.decode(), features="lxml")
forthcoming_activations_div = bs.body.find('div', attrs={'class': 'view-activations-public'})
if forthcoming_activations_div:
tbody = forthcoming_activations_div.find('table', attrs={'class': 'views-table'}).find('tbody')
div = bs.body.find('div', attrs={'class': 'view-activations-public'})
if div:
table = div.find('table', attrs={'class': 'views-table'})
if table:
tbody = table.find('tbody')
for row in tbody.find_all('tr'):
cells = row.find_all('td')
first_cell_text = str(cells[0].find('a').contents[0]).strip()