Skip to content
Extraits de code Groupes Projets
Valider c1905d46 rédigé par Loïc Wikle DUBARD's avatar Loïc Wikle DUBARD
Parcourir les fichiers

random more good gné

parent 7a5502c8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
**Ajout:** **Ajout:**
- shitpostbot5000 latest post every 30' - shitpostbot5000 latest post every 30'
- trigger coucou coucou -> coucoucou - trigger coucou coucou -> coucoucou
- can send a random image from a insta hashtag page
## 19 aout 2019 ## 19 aout 2019
**Ajout:** **Ajout:**
......
...@@ -58,7 +58,11 @@ class Shitpostbot5000(object): ...@@ -58,7 +58,11 @@ class Shitpostbot5000(object):
return links return links
@classmethod @classmethod
def random(self, hashtag=random.choice(['shitpostmeme', 'shitpost', 'shitposts', 'memes', 'climbingmemes', 'rockclimbingmemes', 'climbingmemesaredank', 'climbingmemesofinstagram'])): def random(self, hashtag=''):
if hashtag.strip() == '':
hashtag = random.choice(['shitpostmeme', 'shitpost', 'shitposts', 'memes'])
elif hashtag.strip() == 'climbing':
hashtag = random.choice(['climbingmemes', 'rockclimbingmemes', 'climbingmemesaredank', 'climbingmemesofinstagram'])
self.ctx = ssl.create_default_context() self.ctx = ssl.create_default_context()
self.ctx.check_hostname = False self.ctx.check_hostname = False
self.ctx.verify_mode = ssl.CERT_NONE self.ctx.verify_mode = ssl.CERT_NONE
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter