|
@@ -59,8 +59,8 @@ async def load_pokedex() -> dict:
|
|
cleaned = text.replace("exports.BattlePokedex = ", "").strip(";")
|
|
cleaned = text.replace("exports.BattlePokedex = ", "").strip(";")
|
|
# then convert the keys to strings
|
|
# then convert the keys to strings
|
|
converted = re.sub(JS_TO_JSON, lambda m: f'"{m.group(1)}":', cleaned)
|
|
converted = re.sub(JS_TO_JSON, lambda m: f'"{m.group(1)}":', cleaned)
|
|
- # and fix Type: Null
|
|
|
|
- fixed = converted.replace('""Type": Null"', '"Type: Null"')
|
|
|
|
|
|
+ # and fix Type: Null, Farfetch'd, Sirfetch'd
|
|
|
|
+ fixed = converted.replace('""Type": Null"', '"Type: Null"').replace("’", "'")
|
|
# then, parse it
|
|
# then, parse it
|
|
return json.loads(fixed)
|
|
return json.loads(fixed)
|
|
|
|
|