From 9b0c276d3617506b89ce842ab3e25dfdf863a0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Wed, 22 Oct 2025 15:50:03 +0300 Subject: [PATCH] change from pro to ref --- get_data.py | 61 ++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/get_data.py b/get_data.py index 2f971b9..e6a27bf 100644 --- a/get_data.py +++ b/get_data.py @@ -1,8 +1,3 @@ -GBPLF GBP:F - - - - from __future__ import annotations import os import sys @@ -858,33 +853,33 @@ def Json_Team_Generation(who, data, stop_event): pool.submit(Player_Stat_Season, player_id, data["season"]) for player_id in player_ids ] - player_career_stat_temp = [ - pool.submit(Player_Stat_Career, player_id) - for player_id in player_ids - ] - coach_stat_temp = [ - pool.submit( - Coach_Stat, coach_id, data["season"], data[f"{who}_id"] - ) - for coach_id in coach_ids - ] - player_futures = [ - pool.submit(Player_all_game, pid) for pid in player_ids - ] - all_players_games = [] - for fut in as_completed(player_futures): - try: - all_players_games.append(fut.result()) - except Exception as e: - logger.exception(f"Ошибка при обработке игрока: {e}") + # player_career_stat_temp = [ + # pool.submit(Player_Stat_Career, player_id) + # for player_id in player_ids + # ] + # coach_stat_temp = [ + # pool.submit( + # Coach_Stat, coach_id, data["season"], data[f"{who}_id"] + # ) + # for coach_id in coach_ids + # ] + # player_futures = [ + # pool.submit(Player_all_game, pid) for pid in player_ids + # ] + # all_players_games = [] + # for fut in as_completed(player_futures): + # try: + # all_players_games.append(fut.result()) + # except Exception as e: + # logger.exception(f"Ошибка при обработке игрока: {e}") - player_season_stat += [ - res.result() for res in player_season_stat_temp - ] - player_career_stat += [ - res.result() for res in player_career_stat_temp - ] - coach_stat += [res.result() for res in coach_stat_temp] + # player_season_stat += [ + # res.result() for res in player_season_stat_temp + # ] + # player_career_stat += [ + # res.result() for res in player_career_stat_temp + # ] + # coach_stat += [res.result() for res in coach_stat_temp] initialized = True # print(coach_stat) @@ -2714,7 +2709,7 @@ def get_season_and_schedule() -> dict | None: if season_data and "vtb" in URL else ( season_data.get("items", [{}])[0].get("season") - if season_data and "pro.russiabasket" in URL + if season_data and "russiabasket" in URL else None ) ) @@ -3050,7 +3045,7 @@ def main(): URL = ( "https://basket.sportoteka.org/" if "uba" in LEAGUE.lower() - else "https://pro.russiabasket.org/" + else "https://ref.russiabasket.org/" #pro - основа, ref - резерв # else "https://vtb-league.org/" )