You are viewing a single comment's thread from:

RE: How I made a digital friend for myself

in #piston8 years ago (edited)

you can change formatting, to use code blocks instead quotes:

import os
from piston.steem import Steem

steem = Steem(wif='the posting key goes here')
me = ('normaluser')
os.system('clear')
print ('Welcome to me script for ', me )
for c in steem.stream_comments():
    if '@%s' % me in c['body']:
        print ('voted : ', c['author'], c.upvote(voter=me))

You can do this but using indentation. 4 spaces before each line.

Sort:  

It is three times right-alt 7 on my keyboard. Windows, of course :)

this is formatted

Keep on boting @normaluser

BTW. I think you should keep the record from where onwards are you searching. You don't want to start from block 0 every time...

the piston engine offers this 'stream' feature.
the bot is just listening to the stream, I'm not going through all blocks.
@normaluser doesn't react to a call yet - I'm too lazy.
Also I have to figure out how to ignore the exceptions.

Aha, thanks. I've seen a bookmark in some other code, I think.

I don't know when I'll find some time to set up a steemd system and try it out for myself. The second season for my afternoon job is beginning to warm up which means less and less time for Steemit in the following two months...

In the meantime I'll be cheering for @normaluser :)

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 64170.07
ETH 3425.12
USDT 1.00
SBD 2.59