Fixes pollen
Welke klapmongool heeft dat parsen in een one-liner gedaan? Man man man.
This commit is contained in:
+1
-1
@@ -127,7 +127,7 @@ class General(commands.Cog):
|
||||
response = requests.get(poll)
|
||||
if response:
|
||||
# one-liner want eet stront
|
||||
cijfer = float(re.findall(r";\d\.?\d?;", json.loads([x for x in response.text.splitlines() if "var options =" in x][0].partition("=")[2].strip(";, "))["data"]["csv"])[-1].strip(";"))
|
||||
cijfer = float(re.findall(r";\d\.?\d?\n", json.loads([x for x in response.text.splitlines() if "var options =" in x][0].partition("=")[2].strip(";, "))["data"]["csv"])[-1].strip(";\n"))
|
||||
msg = ""
|
||||
if cijfer < 3:
|
||||
msg = f"Nou, het lijkt goed te gaan. Recentelijk gaven mensen hun klachten maar een {cijfer}. Lekker!"
|
||||
|
||||
Reference in New Issue
Block a user