From c0b689b4dfa34592e8559bd3a47f50d9c1cef436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Wikle=20DUBARD?= <loic97429@gmail.com> Date: Tue, 20 Aug 2019 12:26:41 +0200 Subject: [PATCH] shitpostbot hashtag stripping --- useless/shitpostbot5k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/useless/shitpostbot5k.py b/useless/shitpostbot5k.py index 7195e22..7995bfb 100755 --- a/useless/shitpostbot5k.py +++ b/useless/shitpostbot5k.py @@ -62,7 +62,7 @@ class Shitpostbot5000(object): self.ctx = ssl.create_default_context() self.ctx.check_hostname = False self.ctx.verify_mode = ssl.CERT_NONE - urllib.request.urlretrieve(random.choice(self.getlinks(hashtag, 'https://www.instagram.com/explore/tags/' + hashtag + '/')), 'insta_random.jpg') + urllib.request.urlretrieve(random.choice(self.getlinks(hashtag, 'https://www.instagram.com/explore/tags/' + hashtag.strip() + '/')), 'insta_random.jpg') return 'insta_random.jpg' -- GitLab