properly merge all CSS
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s
This commit is contained in:
parent
0f36e92785
commit
34194aed57
1 changed files with 2 additions and 1 deletions
|
@ -49,9 +49,10 @@ class ElectionCog(commands.Cog):
|
||||||
if not good_soup:
|
if not good_soup:
|
||||||
return
|
return
|
||||||
|
|
||||||
css: str = "\n".join([x.get_text() for x in good_soup.find_all("style") if "Results" in x.get_text()])
|
css: str = "\n".join([x.get_text() for x in good_soup.find_all("style")])
|
||||||
|
|
||||||
def find_colour(style_name: str, want: str = "background-colour") -> str | None:
|
def find_colour(style_name: str, want: str = "background-colour") -> str | None:
|
||||||
|
self.log.info("Looking for style %r", style_name)
|
||||||
index = css.index(style_name) + len(style_name) + 1
|
index = css.index(style_name) + len(style_name) + 1
|
||||||
value = ""
|
value = ""
|
||||||
for char in css[index:]:
|
for char in css[index:]:
|
||||||
|
|
Loading…
Reference in a new issue