change from pro to ref
This commit is contained in:
61
get_data.py
61
get_data.py
@@ -1,8 +1,3 @@
|
|||||||
GBPLF GBP:F
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@@ -858,33 +853,33 @@ def Json_Team_Generation(who, data, stop_event):
|
|||||||
pool.submit(Player_Stat_Season, player_id, data["season"])
|
pool.submit(Player_Stat_Season, player_id, data["season"])
|
||||||
for player_id in player_ids
|
for player_id in player_ids
|
||||||
]
|
]
|
||||||
player_career_stat_temp = [
|
# player_career_stat_temp = [
|
||||||
pool.submit(Player_Stat_Career, player_id)
|
# pool.submit(Player_Stat_Career, player_id)
|
||||||
for player_id in player_ids
|
# for player_id in player_ids
|
||||||
]
|
# ]
|
||||||
coach_stat_temp = [
|
# coach_stat_temp = [
|
||||||
pool.submit(
|
# pool.submit(
|
||||||
Coach_Stat, coach_id, data["season"], data[f"{who}_id"]
|
# Coach_Stat, coach_id, data["season"], data[f"{who}_id"]
|
||||||
)
|
# )
|
||||||
for coach_id in coach_ids
|
# for coach_id in coach_ids
|
||||||
]
|
# ]
|
||||||
player_futures = [
|
# player_futures = [
|
||||||
pool.submit(Player_all_game, pid) for pid in player_ids
|
# pool.submit(Player_all_game, pid) for pid in player_ids
|
||||||
]
|
# ]
|
||||||
all_players_games = []
|
# all_players_games = []
|
||||||
for fut in as_completed(player_futures):
|
# for fut in as_completed(player_futures):
|
||||||
try:
|
# try:
|
||||||
all_players_games.append(fut.result())
|
# all_players_games.append(fut.result())
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
logger.exception(f"Ошибка при обработке игрока: {e}")
|
# logger.exception(f"Ошибка при обработке игрока: {e}")
|
||||||
|
|
||||||
player_season_stat += [
|
# player_season_stat += [
|
||||||
res.result() for res in player_season_stat_temp
|
# res.result() for res in player_season_stat_temp
|
||||||
]
|
# ]
|
||||||
player_career_stat += [
|
# player_career_stat += [
|
||||||
res.result() for res in player_career_stat_temp
|
# res.result() for res in player_career_stat_temp
|
||||||
]
|
# ]
|
||||||
coach_stat += [res.result() for res in coach_stat_temp]
|
# coach_stat += [res.result() for res in coach_stat_temp]
|
||||||
|
|
||||||
initialized = True
|
initialized = True
|
||||||
# print(coach_stat)
|
# print(coach_stat)
|
||||||
@@ -2714,7 +2709,7 @@ def get_season_and_schedule() -> dict | None:
|
|||||||
if season_data and "vtb" in URL
|
if season_data and "vtb" in URL
|
||||||
else (
|
else (
|
||||||
season_data.get("items", [{}])[0].get("season")
|
season_data.get("items", [{}])[0].get("season")
|
||||||
if season_data and "pro.russiabasket" in URL
|
if season_data and "russiabasket" in URL
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -3050,7 +3045,7 @@ def main():
|
|||||||
URL = (
|
URL = (
|
||||||
"https://basket.sportoteka.org/"
|
"https://basket.sportoteka.org/"
|
||||||
if "uba" in LEAGUE.lower()
|
if "uba" in LEAGUE.lower()
|
||||||
else "https://pro.russiabasket.org/"
|
else "https://ref.russiabasket.org/" #pro - основа, ref - резерв
|
||||||
# else "https://vtb-league.org/"
|
# else "https://vtb-league.org/"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user