|
|
|
@ -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 = {} |
|
|
|
|