Quildra 1 year ago
parent
commit
4470e09474
  1. 7
      DataGatherers/DetermineOriginGame.py
  2. 2
      DataGatherers/update_location_information.py

7
DataGatherers/DetermineOriginGame.py

@ -547,7 +547,7 @@ def compare_forms(a, b):
return False
def get_locations_from_bulbapedia(pokemon_name, form, cache: CacheManager):
def get_locations_from_bulbapedia(pokemon_name, form, cache: CacheManager, default_forms = None):
page_data = get_pokemon_data_bulbapedia(pokemon_name, cache)
if not page_data:
return None
@ -635,8 +635,13 @@ def get_locations_from_bulbapedia(pokemon_name, form, cache: CacheManager):
for raw_location in raw_locations:
raw_text = raw_location.get_text()
main_form, sub_form = parse_form_information(str(raw_location))
if default_forms and main_form and main_form in default_forms:
main_form = None
if main_form and (main_form != "All Forms" and main_form != "Kantonian Form"):
continue
if raw_game not in game_locations:
game_locations[raw_game] = []
info = {}

2
DataGatherers/update_location_information.py

@ -287,7 +287,7 @@ if __name__ == "__main__":
encounters_to_ignore = ["trade", "time capsule", "unobtainable", "evolve", "tradeversion", "poké transfer", "friend safari", "unavailable", "pokémon home"]
encounter_data = get_locations_from_bulbapedia(name, search_form, cache)
encounter_data = get_locations_from_bulbapedia(name, search_form, cache, default_forms)
if encounter_data == None:
continue

Loading…
Cancel
Save