just remove all commas
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 8s

This commit is contained in:
Nexus 2024-05-03 20:36:19 +01:00
parent f66b496b22
commit 59e208b4c7
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -78,7 +78,7 @@ class ElectionCog(commands.Cog):
self.log.warning("%r did not have a 'span' element.", child_ul) self.log.warning("%r did not have a 'span' element.", child_ul)
continue continue
text = span.get_text() text = span.get_text().replace(",", "")
groups = SPAN_REGEX.match(text) groups = SPAN_REGEX.match(text)
if groups: if groups:
groups = groups.groupdict() groups = groups.groupdict()
@ -90,8 +90,8 @@ class ElectionCog(commands.Cog):
continue continue
results[str(groups["party"]).strip()] = [ results[str(groups["party"]).strip()] = [
int(groups["councillors"].strip().strip(",")), int(groups["councillors"].strip()),
int(groups["net"].strip().strip(",")) * MULTI[groups["net_change"]], int(groups["net"].strip()) * MULTI[groups["net_change"]],
int(find_colour(child_ul.next["class"][0])[1:], base=16) int(find_colour(child_ul.next["class"][0])[1:], base=16)
] ]
return results return results