feat: add timeouts to all requests requests

This commit is contained in:
Iain Learmonth 2023-03-12 12:28:29 +00:00
parent 2498f408c8
commit fff38fa994
7 changed files with 10 additions and 7 deletions

View file

@ -22,7 +22,7 @@ def check_origin(domain_name: str) -> Dict[str, Any]:
def _check_origin(api_url: str, result: Dict[str, Any]) -> Dict[str, Any]:
print(f"Processing {api_url}")
req = requests.get(api_url).json()
req = requests.get(api_url, timeout=30).json()
if 'results' not in req or not req['results']:
return result
for r in req['results']: