[Dictionary] Be more specific on replacing

Thanks Axas.
This commit is contained in:
aikaterna
2021-10-06 12:53:21 -07:00
committed by GitHub
parent 87871bd351
commit 6ae25b4dbb

View File

@@ -127,7 +127,7 @@ class Dictionary(commands.Cog):
if "window.INITIAL_STATE" in item.string:
content = item.string
content = content.lstrip("window.INITIAL_STATE =").rstrip(";")
content = content.replace("undefined", '"None"').replace("true", '"True"').replace("false", '"False"')
content = content.replace("undefined", '"None"').replace(": true", ': "True"').replace(": false", ': "False"')
try:
website_data = json.loads(content)
except json.decoder.JSONDecodeError: