removed cert verification for requests library

Former-commit-id: 4914b98a21478a10be7d2f737dd6d5669b4c5681
This commit is contained in:
Arthur Lu 2022-02-20 23:38:18 +00:00
parent d7ed695ad1
commit 9a1a45f1c9
2 changed files with 5 additions and 6 deletions

View File

@ -51,7 +51,7 @@ def get_metrics_data_formatted(client, competition):
return out
def get_pit_data_formatted(client, competition):
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition)
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition, verify=False)
x = x.json()
x = x['data']
x = x.keys()

View File

@ -1,5 +1,4 @@
import requests
import json
from exceptions import APIError
from dep import load_config
@ -14,7 +13,7 @@ def get_team_competition():
"CLIENT_ID": trakey['CLIENT_ID'],
"CLIENT_SECRET": trakey['CLIENT_SECRET']
}
response = requests.request("GET", url + endpoint, params=params)
response = requests.request("GET", url + endpoint, verify=False, params=params)
json = response.json()
if json['success']:
return json['competition']
@ -27,7 +26,7 @@ def get_team():
"CLIENT_ID": trakey['CLIENT_ID'],
"CLIENT_SECRET": trakey['CLIENT_SECRET']
}
response = requests.request("GET", url + endpoint, params=params)
response = requests.request("GET", url + endpoint, verify=False, params=params)
json = response.json()
if json['success']:
return json['team']
@ -42,7 +41,7 @@ def get_team_match_data(competition, team_num):
"CLIENT_ID": trakey['CLIENT_ID'],
"CLIENT_SECRET": trakey['CLIENT_SECRET']
}
response = requests.request("GET", url + endpoint, params=params)
response = requests.request("GET", url + endpoint, verify=False, params=params)
json = response.json()
if json['success']:
return json['data'][team_num]
@ -56,7 +55,7 @@ def get_teams_at_competition(competition):
"CLIENT_ID": trakey['CLIENT_ID'],
"CLIENT_SECRET": trakey['CLIENT_SECRET']
}
response = requests.request("GET", url + endpoint, params=params)
response = requests.request("GET", url + endpoint, verify=False, params=params)
json = response.json()
if json['success']:
return list(json['data'].keys())