хз что)
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@
|
||||
/JSON/*
|
||||
/logs/*
|
||||
/static/*
|
||||
get_data_new copy 2.py
|
||||
get_data_new copy.py
|
||||
temp.json
|
||||
36
get_data.py
36
get_data.py
@@ -71,7 +71,7 @@ LOG_CONFIG = {
|
||||
},
|
||||
"console": {
|
||||
"class": "logging.StreamHandler",
|
||||
"level": "INFO",
|
||||
"level": "DEBUG",
|
||||
"formatter": "simple",
|
||||
"stream": "ext://sys.stdout",
|
||||
},
|
||||
@@ -217,7 +217,7 @@ else: # значит указан --region
|
||||
# === Глобальные настройки ===
|
||||
TIMEOUT_ONLINE = 1
|
||||
FETCH_INTERVAL = 2
|
||||
TIMEOUT_DATA_OFF = 60
|
||||
TIMEOUT_DATA_OFF = 1
|
||||
|
||||
|
||||
game_online_data = None
|
||||
@@ -412,7 +412,7 @@ def Game_Online(game_id: int) -> dict | None:
|
||||
return f"{URL}api/abc/games/{endpoint}?Id={game_id}&Lang={LANG}"
|
||||
|
||||
box_score = get_json(build_url("box-score"))
|
||||
print(box_score)
|
||||
# print(box_score)
|
||||
if not box_score or box_score.get("status") != "Ok":
|
||||
# Проверим — матч сейчас online?
|
||||
live = get_json(f"{URL}api/abc/games/live-status?id={game_id}")
|
||||
@@ -848,11 +848,11 @@ def Json_Team_Generation(who, data, stop_event):
|
||||
player_season_stat = []
|
||||
player_career_stat = []
|
||||
coach_stat = []
|
||||
with ThreadPoolExecutor(max_workers=1) as pool:
|
||||
player_season_stat_temp = [
|
||||
pool.submit(Player_Stat_Season, player_id, data["season"])
|
||||
for player_id in player_ids
|
||||
]
|
||||
# with ThreadPoolExecutor(max_workers=1) as pool:
|
||||
# player_season_stat_temp = [
|
||||
# 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
|
||||
@@ -1569,11 +1569,11 @@ def Json_Team_Generation(who, data, stop_event):
|
||||
),
|
||||
"HeadCoachStatsCareer": HeadCoachStatsCareer,
|
||||
"HeadCoachStatsTeam": HeadCoachStatsTeam,
|
||||
"PTS_Career_High": get_carrer_high(item["personId"], "points"),
|
||||
"AST_Career_High": get_carrer_high(item["personId"], "assist"),
|
||||
"REB_Career_High": get_carrer_high(item["personId"], "rebound"),
|
||||
"STL_Career_High": get_carrer_high(item["personId"], "steal"),
|
||||
"BLK_Career_High": get_carrer_high(item["personId"], "blockShot"),
|
||||
# "PTS_Career_High": get_carrer_high(item["personId"], "points"),
|
||||
# "AST_Career_High": get_carrer_high(item["personId"], "assist"),
|
||||
# "REB_Career_High": get_carrer_high(item["personId"], "rebound"),
|
||||
# "STL_Career_High": get_carrer_high(item["personId"], "steal"),
|
||||
# "BLK_Career_High": get_carrer_high(item["personId"], "blockShot"),
|
||||
}
|
||||
team.append(player)
|
||||
count_player = sum(1 for x in team if x["startRole"] == "Player")
|
||||
@@ -3105,7 +3105,7 @@ def main():
|
||||
threading.Thread(
|
||||
target=Team_Both_Stat, args=(stop_event,), name="BothTeamsStat"
|
||||
),
|
||||
threading.Thread(target=Referee, args=(stop_event,), name="Referee"),
|
||||
# threading.Thread(target=Referee, args=(stop_event,), name="Referee"),
|
||||
threading.Thread(
|
||||
target=Scores_Quarter, args=(stop_event,), name="QuarterScore"
|
||||
),
|
||||
@@ -3115,9 +3115,9 @@ def main():
|
||||
threading.Thread(
|
||||
target=Play_By_Play, args=(data, stop_event), name="PlayByPlay"
|
||||
),
|
||||
threading.Thread(
|
||||
target=Standing_func, args=(data, stop_event), name="Standings"
|
||||
),
|
||||
# threading.Thread(
|
||||
# target=Standing_func, args=(data, stop_event), name="Standings"
|
||||
# ),
|
||||
]
|
||||
|
||||
# Запуск всех потоков
|
||||
@@ -3125,7 +3125,7 @@ def main():
|
||||
t.start()
|
||||
logger.debug(f"Поток {t.name} запущен.")
|
||||
|
||||
How_To_Play_Quarter(data)
|
||||
# How_To_Play_Quarter(data)
|
||||
pregame_data(data)
|
||||
|
||||
# try:
|
||||
|
||||
1515
get_data_new.py
Normal file
1515
get_data_new.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user