From 9752fd323b872107fbe058fc703e70dd33ad2544 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 25 Mar 2022 13:39:24 -0500 Subject: [PATCH] remove time check --- competition/data.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/competition/data.py b/competition/data.py index da8117a..bd833ee 100644 --- a/competition/data.py +++ b/competition/data.py @@ -4,11 +4,12 @@ import pandas as pd import json def pull_new_tba_matches(apikey, competition, cutoff): - api_key= apikey + api_key= apikey x=requests.get("https://www.thebluealliance.com/api/v3/event/"+competition+"/matches/simple", headers={"X-TBA-Auth-Key":api_key}) + json = x.json() out = [] - for i in x.json(): - if i["actual_time"] != None and i["actual_time"]-cutoff >= 0 and i["comp_level"] == "qm": + for i in json: + if i["actual_time"] != None and i["comp_level"] == "qm": out.append({"match" : i['match_number'], "blue" : list(map(lambda x: int(x[3:]), i['alliances']['blue']['team_keys'])), "red" : list(map(lambda x: int(x[3:]), i['alliances']['red']['team_keys'])), "winner": i["winning_alliance"]}) return out @@ -203,4 +204,4 @@ def push_pit(client, competition, pit): def check_new_database_matches(client, competition): - return True \ No newline at end of file + return True