Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from piston import Steem
- steem = Steem(wif="tu_posting_private_key")
- # Instancia de la red de steem
- # Le agregamos de parĂ¡metro nuestra Wif para poder postear
- accountname = 'tu_cuenta_de_steemit'
- # Creamos una constante con nuestra cuenta de usuario
- # Hacemos un ciclo for con el streaming de la red en la var comment
- for comment in steem.stream_comments():
- # Hacemos algunos prints para visualizar que estamos obteniendo
- print('Author: '+ comment.author)
- print('permlink: '+ comment.permlink)
- # print('title: '+ comment.body )
- if "@%s" % accountname in comment["body"]:
- # En este if evaluaremos si en los datos en tiempo real de la red alguien menciona a nuestro usuario
- # se comente el mensaje que queramos
- comment.reply("mensaje que quieras")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement