Add additional categories for gens 1 - 4.

This commit is contained in:
Adrian Kuschelyagi Malacoda 2020-07-30 04:16:26 -05:00
parent 191e1ebd13
commit d4002ec592

View File

@ -6,12 +6,18 @@ import json
GCL_URL = "https://glitchcity.info/"
API_ENDPOINT = "/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:{}&prop=info&gcmlimit=100&format=json"
CATEGORIES = ["Generation I glitches", "Generation II glitches", "Generation III glitches", "Generation IV glitches"]
CATEGORIES = [
"Generation I glitches", "Generation II glitches", "Generation III glitches", "Generation IV glitches",
"Generation I glitch Pokémon", "Generation II glitch Pokémon", "Generation III glitch Pokémon", "Generation IV glitch Pokémon",
"Pokémon Red and Blue glitch moves", "Pokémon Yellow glitch moves", "Generation II glitch moves",
"Generation I glitch items", "Generation II glitch items", "Generation IV glitch items",
"Generation I glitch Trainers", "Generation II glitch Trainers"
]
FILTER_MODIFIED_SINCE_THEN = date(2020, 3, 31)
def get_pages_for_category(url, category):
category = category.replace(" ", "_")
category = category.replace(" ", "_").replace("é", "%C3%A9")
pages = {}
continue_param = None
while True: