Steemit vote Bot like @wang for introduceyourself
hacking·@seagul·
0.000 HBDSteemit vote Bot like @wang for introduceyourself
https://www.telekom.de/resources/images/171780/hacker.jpg
Hello Steemit,
yesterday i was wondering how difficult it actually is, to write a simple vote or post bot for the "introduceyourself" section. (Like @wang is doing it)
With the help of https://github.com/xeroc/python-steemlib it was actually quite easy. (I had no experience with python before). @xeroc did an amazing job with the library!
For all other user, who want to start programming on steemit:
## Full python code for upvote every new post @introduceyourself
import time
from steemapi.steemnoderpc import SteemNodeRPC
from steembase import transactions
currentTime = int(time.time())
user = "yourUsername"
wif = "yourWifKey"
category = "introduceyourself"
rpc = SteemNodeRPC("wss://steemit.com/wstmp3")
for post in rpc.stream("comment", start=currentTime):
if post["parent_author"] == '' and post["parent_permlink"] == category:
try:
expiration = transactions.formatTimeFromNow(60)
op = transactions.Vote(
**{"voter": user,
"author": post["author"],
"permlink": post["permlink"],
"weight": int(10000)}
)
ops = [transactions.Operation(op)]
ref_block_num, ref_block_prefix = transactions.getBlockParams(rpc)
tx = transactions.Signed_Transaction(
ref_block_num=ref_block_num,
ref_block_prefix=ref_block_prefix,
expiration=expiration,
operations=ops)
tx = tx.sign([wif])
tx = transactions.JsonObj(tx)
# Broadcast JSON to network
rpc.broadcast_transaction(tx, api="network_broadcast")
print("Voted!")
print(post["title"])
except Exception:
print("Oops! Maybe already voted or voted to often")
You can see the second part (the post bot) here: https://steemit.com/hacking/@seagul/steemit-post-bot-like-wang-for-introduceyourself👍 seagul, artific, pstrident, timur-yusupov, crazylife, grey580, asim, serg999, stephencurry, mrgreen, wenden, manugbr93, nate-atkins, kostnik, bones, sanbir, bitcoiner, thecleangame, daycrypter, roslinpl, zebbra2014, darwen, mapipaz, soupernerd, vdoh, bitlord, sokoloffa, rizkypramudyacj, endgame, glassartsamhart, rainbowdash, bolnavioru, warplat, wildmanwilly, konstantin, cryptotrends, nazeehit, krabgat, pipokinha, davidm7, altoz, gribgo, calva, cryptosi, delik, sigmajin,