мини защита от сброса данных в базе данных, если данных нет
This commit is contained in:
@@ -68,13 +68,13 @@ def parse_standings(html: str) -> list[dict]:
|
||||
def run_parser_standings() -> None:
|
||||
html = fetch_html(URL_STANDINGS)
|
||||
standings_rows = parse_standings(html)
|
||||
if standings_rows:
|
||||
sync_standings(
|
||||
season=SEASON,
|
||||
standings_rows=standings_rows,
|
||||
)
|
||||
|
||||
sync_standings(
|
||||
season=SEASON,
|
||||
standings_rows=standings_rows,
|
||||
)
|
||||
|
||||
print(f"[parser_standings] Synced rows: {len(standings_rows)}")
|
||||
print(f"[parser_standings] Synced rows: {len(standings_rows)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user