From 8266de0d8a391c81d516f72fcb2f697920063802 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:10:44 -0500 Subject: [PATCH] Update notifications.py --- 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 51fe0ce..8ed3770 100644 --- a/scripts/utils/notifications.py +++ b/scripts/utils/notifications.py @@ -68,7 +68,7 @@ def sendAppriseNotifications(species, confidence, path, date, time, week, latitu # TODO: Make this work with non-english comnames. Implement the "// convert sci name to English name" logic from overview.php here 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) - resp.encoding= "utf-8" + resp.encoding = "utf-8" data = resp.json()["photos"]["photo"][0] image_url = 'https://farm'+str(data["farm"])+'.static.flickr.com/'+str(data["server"])+'/'+str(data["id"])+'_'+str(data["secret"])+'_n.jpg'