From 9a1a45f1c9573aa2e08493321350f8ba79845e4d Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Sun, 20 Feb 2022 23:38:18 +0000 Subject: [PATCH] removed cert verification for requests library Former-commit-id: 4914b98a21478a10be7d2f737dd6d5669b4c5681 --- src/data.py | 2 +- src/pull.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/data.py b/src/data.py index f8d80fa..dac7f9a 100644 --- a/src/data.py +++ b/src/data.py @@ -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() diff --git a/src/pull.py b/src/pull.py index 2996267..ee65571 100644 --- a/src/pull.py +++ b/src/pull.py @@ -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())