change from pro to ref

This commit is contained in:
2025-10-22 15:50:03 +03:00
parent 5cb7b2f6c8
commit 9b0c276d36

View File

@@ -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/"
)