Steemit post Bot like @wang for introduceyourself
hacking·@seagul·
0.000 HBDSteemit post Bot like @wang for introduceyourself
https://www.telekom.de/resources/images/171780/hacker.jpg Hello Steemit, this is the second part of the series "how @wang is doing it" You can read the first post here https://steemit.com/hacking/@seagul/steemit-vote-bot-like-wang-for-introduceyourself Like i said in my first post, i will publish the post bot for the introduceyourself section ## Full python code for post on every new post @introduceyourself import time from steemapi.steemnoderpc import SteemNodeRPC from steembase import transactions currentTime = int(time.time()) message = "Welcome to Steemit!" 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.Comment( **{"parent_author": post["author"], "parent_permlink": post["permlink"], "author": user, "permlink": post["permlink"], "title": "", "body": message, "json_metadata": ""} ) 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) rpc.broadcast_transaction(tx, api="network_broadcast") print("Posted!") print(post["title"]) except Exception: print("Oops! Posting") This script will write "Welcome to Steemit!" under each new post in the introduceyourself section. @wang was a little bit more creative and has done a [multiline string] message. Example: http://stackoverflow.com/a/10660443
👍 seagul, joshbreslauer, iraniansteem, crazylife, marsresident, artific, drinkzya, ask-not-please, losos, mrgreen, asim, yorg, ardina, warrensteem, ydm6669, bdavid, stephencurry, yarly10, toho, inboundinken, akareyon, neroru, pastemaster, wenden, soupernerd, fishborne, manugbr93, averagejoe, acidsun, shinigamis, zaluperis, nate-atkins, johnnydollar, joshuanboles, inertia, razvanul05, biophil, sunshinecrypto, moh-rokib, miohtama, daycrypter, streetstyle, sanbir, eristoddle, weenis, bitcoiner, cybercodetwins, thecleangame, hien-tran, mapipaz, novagirl, roslinpl, zebbra2014, maykor15, darwen, hendra-khaidir, mairavrg, meesterboom, sokoloffa, kamirus, shibley, sasi, bitlord, jcweiss, justbc, nansy, arcurus, coliraver, charbelnamm, cryptotrends, michaelx, cousteau, raymonjohnstone, choochoo, dimitarj, damono, rizkypramudyacj, dimon14, iamwne, endgame, glassartsamhart, crypto-fan, bolnavioru, pipokinha, warplat, digitalinvestor, btotherest, wildmanwilly, zaebars, krabgat, allstar, villagetrading, nigmat, mattyfu, gribgo, rakkarage,