From 1c62da3e68c6ba6e119385e97008d36f9db23946 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Mon, 27 Dec 2021 13:59:06 +0100 Subject: [PATCH] fix giphy integration --- distbot/common/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distbot/common/utils.py b/distbot/common/utils.py index b3bac4d..c115ab9 100644 --- a/distbot/common/utils.py +++ b/distbot/common/utils.py @@ -59,12 +59,12 @@ def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None): def giphy(subject, api_key): - url = 'http://api.giphy.com/v1/gifs/random?tag={}&api_key={}&limit=1&offset=0'.format(subject, api_key) + url = 'https://api.giphy.com/v1/gifs/random?tag={}&api_key={}&limit=1&offset=0'.format(subject, api_key) response = requests.get(url) giphy_url = None try: data = response.json() - giphy_url = data['data']['image_url'] + giphy_url = data['data']['images']['original']['url'] except: pass return giphy_url -- 2.39.2