6 changed files with 167 additions and 38 deletions
@ -0,0 +1,29 @@ |
|||
from PyQt6.QtCore import QObject, pyqtSignal, QRunnable |
|||
from bs4 import BeautifulSoup |
|||
from cache import cache |
|||
from db import db |
|||
|
|||
class GatherEvolutionsWorkerSignals(QObject): |
|||
finished = pyqtSignal(list) |
|||
|
|||
class GatherHEvolutions(QRunnable): |
|||
def __init__(self): |
|||
super().__init__() |
|||
self.signals = GatherEvolutionsWorkerSignals() |
|||
self.base_url = "https://www.serebii.net/pokemonhome/" |
|||
|
|||
def run(self): |
|||
try: |
|||
gathered_data = self.gather_evolution_data() |
|||
self.signals.finished.emit(gathered_data) |
|||
except Exception as e: |
|||
print(f"Error gathering Pokémon home storage status: {e}") |
|||
|
|||
def gather_evolution_data(self): |
|||
all_pokemon_forms = db.get_list_of_pokemon_forms() |
|||
evolutions = [] |
|||
|
|||
for pokemon_form in all_pokemon_forms: |
|||
pass |
|||
|
|||
return evolutions |
|||
Loading…
Reference in new issue