From e20340aefa47343d87ec66bc41ea8b1af3b08d87 Mon Sep 17 00:00:00 2001 From: frederik Date: Wed, 3 Jan 2024 16:23:59 +0100 Subject: [PATCH] timeout --- scripts/utils/notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/notifications.py b/scripts/utils/notifications.py index bd87972..d59addc 100644 --- a/scripts/utils/notifications.py +++ b/scripts/utils/notifications.py @@ -89,7 +89,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path, headers = {'User-Agent': 'Python_Flickr/1.0'} url = ('https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=' + str(settings_dict.get('FLICKR_API_KEY')) + '&text=' + str(comName) + ' bird&sort=relevance&per_page=5&media=photos&format=json&license=2%2C3%2C4%2C5%2C6%2C9&nojsoncallback=1') - resp = requests.get(url=url, headers=headers) + resp = requests.get(url=url, headers=headers, timeout=10) resp.encoding = "utf-8" data = resp.json()["photos"]["photo"][0]