|
|
@ -1,7 +1,8 @@
|
|
|
|
from ispoof.objects.player import Player
|
|
|
|
from ispoof.objects.player import Player
|
|
|
|
from ispoof.spoofer.scraper import Scraper
|
|
|
|
from ispoof.spoofer.scraper import Scraper
|
|
|
|
from ispoof.spoofer.device import Device
|
|
|
|
from ispoof.spoofer.device import Device
|
|
|
|
from ispoof.lists.pokemonlist import PokemonList
|
|
|
|
from ispoof.lists import PokemonList, RaidList
|
|
|
|
|
|
|
|
|
|
|
|
from ispoof.data import Database
|
|
|
|
from ispoof.data import Database
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
@ -17,7 +18,34 @@ if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
scraper = Scraper()
|
|
|
|
scraper = Scraper()
|
|
|
|
pokemon_lst = PokemonList(engine=engine)
|
|
|
|
pokemon_lst = PokemonList(engine=engine)
|
|
|
|
|
|
|
|
raid_lst = RaidList(engine=engine)
|
|
|
|
while True:
|
|
|
|
while True:
|
|
|
|
|
|
|
|
print("1. Raid")
|
|
|
|
|
|
|
|
print("2. Pokemon")
|
|
|
|
|
|
|
|
raid_or_mon = int(input("Choose 1: "))
|
|
|
|
|
|
|
|
if raid_or_mon == 1:
|
|
|
|
|
|
|
|
raids = scraper.get_raids()
|
|
|
|
|
|
|
|
raid_lst.insert_to_database(raids)
|
|
|
|
|
|
|
|
print("1. Sort by name")
|
|
|
|
|
|
|
|
print("2. Sort by level")
|
|
|
|
|
|
|
|
print("3. Sort by distance")
|
|
|
|
|
|
|
|
print("4. Search name")
|
|
|
|
|
|
|
|
choice = int(input("Your choice: "))
|
|
|
|
|
|
|
|
if choice == 1:
|
|
|
|
|
|
|
|
raids = raid_lst.sort_by_name()
|
|
|
|
|
|
|
|
elif choice == 2:
|
|
|
|
|
|
|
|
raids = raid_lst.sort_by_level()
|
|
|
|
|
|
|
|
elif choice == 3:
|
|
|
|
|
|
|
|
raids = raid_lst.sort_by_distance(player.location)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
raids = raid_lst.search_by_name(input("Enter query: "))
|
|
|
|
|
|
|
|
print("Raid List:")
|
|
|
|
|
|
|
|
for i, raid in enumerate(raids):
|
|
|
|
|
|
|
|
print(i, raid)
|
|
|
|
|
|
|
|
i = int(input("Choose raid: "))
|
|
|
|
|
|
|
|
pokemon = raids[i]
|
|
|
|
|
|
|
|
location = raid.location
|
|
|
|
|
|
|
|
else:
|
|
|
|
pokemons = scraper.get_hundos()
|
|
|
|
pokemons = scraper.get_hundos()
|
|
|
|
pokemon_lst.insert_to_database(pokemons)
|
|
|
|
pokemon_lst.insert_to_database(pokemons)
|
|
|
|
print("1. Sort by name")
|
|
|
|
print("1. Sort by name")
|
|
|
|