From 98af7094fe78886e2b2248ecf65b6b922a42110a Mon Sep 17 00:00:00 2001 From: luke Date: Sat, 10 Oct 2020 16:59:18 -0700 Subject: [PATCH] removing the appending of .png to reddit images --- app/get_from_reddit.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/get_from_reddit.py b/app/get_from_reddit.py index 15c769bd..a8a3adae 100644 --- a/app/get_from_reddit.py +++ b/app/get_from_reddit.py @@ -47,8 +47,4 @@ def get_image(boards, nsfw=False): return get_image(boards, nsfw=nsfw) image_url = response['data']['url'].replace('http://', 'https://') - if not image_url.endswith('png') or not image_url.endswith('jpg') or not image_url.endswith('gif'): - image_url = image_url + '.png' - - return image_url