log when souping goes wrong
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled

This commit is contained in:
Nexus 2024-07-05 00:22:02 +01:00
parent a3d03d3446
commit 0071ea19ac

View file

@ -103,6 +103,7 @@ class ElectionCog(commands.Cog):
def process_soup(self, soup: BeautifulSoup) -> dict[str, list[int]] | None:
good_soups = list(soup.find_all(attrs={"data-testid": "election-banner-results-bar"}))
if not good_soups:
self.log.error("No 'election-banner-results-bar' elements found:\n%r", soup.prettify())
return
good_soup = list(good_soups)[1]