fixed null removal script

This commit is contained in:
Jacob Levine 2019-03-21 16:48:02 -05:00
parent 7f80339fb4
commit 6a0d8f4144
2 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,3 @@
29,63,35,37,26,51,35,58,30,61,45
35
63,61,45
26,62,45,37,42,29,59,44,40
35,63,62,18,56,65,42,77,82,63,76,50,47,69,57,65,85,70,38,67,89,74,71,67,70,71,95,77,45

1 29,63,35,37,26,51,35,58,30,61,45
2 35 26,62,45,37,42,29,59,44,40
3 63,61,45 35,63,62,18,56,65,42,77,82,63,76,50,47,69,57,65,85,70,38,67,89,74,71,67,70,71,95,77,45

View File

@ -197,9 +197,11 @@ def pulldata():
#print(teams[i][0])
request_data_object = tba.req_team_matches(teams[i][0], 2019, "UDvKmPjPRfwwUdDX1JxbmkyecYBJhCtXeyVk9vmO2i7K0Zn4wqQPMfzuEINXJ7e5")
json_data = request_data_object.json()
#for i in json_data:
for match in range(len(json_data) - 1, -1, -1):
if json_data[match].get('winning_alliance') == "":
print(json_data[match])
json_data.remove(json_data[match])
# if i
json_data = sorted(json_data, key=lambda k: k.get('actual_time', 0), reverse=False)
for j in range(len(json_data)):