Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
B
Bot messenger
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Déploiement
Releases
Registre de conteneurs
Registre de modèles
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Loïc DUBARD
Bot messenger
Validations
5428186c
Valider
5428186c
rédigé
Il y a 5 ans
par
Loïc Wikle DUBARD
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
shitpostbot send image instead of link
parent
e4637148
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
bot.py
+3
-3
3 ajouts, 3 suppressions
bot.py
useless/shitpostbot5k.py
+2
-1
2 ajouts, 1 suppression
useless/shitpostbot5k.py
avec
5 ajouts
et
4 suppressions
bot.py
+
3
−
3
Voir le fichier @
5428186c
...
...
@@ -59,7 +59,7 @@ class Bot(Client):
'
!memes <image_name_or_url> ; <texte1> ; <texte2(facultatif)> ... not yet implemented
\n
'
+
\
'
!ping
\n
'
+
\
'
!translate <phrase> ; <lang_source> ; <lang_dest>
\n
'
+
\
'
!shitpostbot5000 [status|on|off|random
|timer
] ... ne pas utiliser PLEASE
\n
'
+
\
'
!shitpostbot5000 [status|on|off|random
<keyword(facultatif)>
] ... ne pas utiliser PLEASE
\n
'
+
\
'
!about -> vas-y test-moi !
\n
'
return
help_text
elif
'
!translate
'
in
texte
:
...
...
@@ -105,9 +105,9 @@ class Bot(Client):
elif
'
!shitpostbot5000 random
'
in
texte
:
texte
=
texte
.
replace
(
'
!shitpostbot5000 random
'
,
''
)
if
texte
==
''
:
return
useless
.
Shitpostbot5000
.
random
()
self
.
sendLocalImage
(
useless
.
Shitpostbot5000
.
random
()
,
thread_id
=
thread_id
,
thread_type
=
thread_type
)
else
:
return
useless
.
Shitpostbot5000
.
random
(
texte
)
self
.
sendLocalImage
(
useless
.
Shitpostbot5000
.
random
(
texte
)
,
thread_id
=
thread_id
,
thread_type
=
thread_type
)
# pour rigoler
elif
'
!memes templates
'
in
texte
:
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
useless/shitpostbot5k.py
+
2
−
1
Voir le fichier @
5428186c
...
...
@@ -62,7 +62,8 @@ class Shitpostbot5000(object):
self
.
ctx
=
ssl
.
create_default_context
()
self
.
ctx
.
check_hostname
=
False
self
.
ctx
.
verify_mode
=
ssl
.
CERT_NONE
return
random
.
choice
(
self
.
getlinks
(
hashtag
,
'
https://www.instagram.com/explore/tags/
'
+
hashtag
+
'
/
'
))
urllib
.
request
.
urlretrieve
(
random
.
choice
(
self
.
getlinks
(
hashtag
,
'
https://www.instagram.com/explore/tags/
'
+
hashtag
+
'
/
'
)),
'
insta_random.jpg
'
)
return
'
insta_random.jpg
'
if
__name__
==
"
__main__
"
:
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter