From: Thorsten Date: Mon, 27 Dec 2021 12:59:06 +0000 (+0100) Subject: fix giphy integration X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=1c62da3e68c6ba6e119385e97008d36f9db23946;p=urlbot-v3.git fix giphy integration --- 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