mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2025-01-30 17:05:55 +00:00
remove time check
This commit is contained in:
parent
ef63c1de7e
commit
9752fd323b
@ -4,11 +4,12 @@ import pandas as pd
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
def pull_new_tba_matches(apikey, competition, cutoff):
|
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})
|
x=requests.get("https://www.thebluealliance.com/api/v3/event/"+competition+"/matches/simple", headers={"X-TBA-Auth-Key":api_key})
|
||||||
|
json = x.json()
|
||||||
out = []
|
out = []
|
||||||
for i in x.json():
|
for i in json:
|
||||||
if i["actual_time"] != None and i["actual_time"]-cutoff >= 0 and i["comp_level"] == "qm":
|
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"]})
|
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
|
return out
|
||||||
|
|
||||||
@ -203,4 +204,4 @@ def push_pit(client, competition, pit):
|
|||||||
|
|
||||||
def check_new_database_matches(client, competition):
|
def check_new_database_matches(client, competition):
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user