Would you like to learn to make your own SCRIPT for RESETEEM and UPVOTE ?

in #developer6 years ago

I have been planning to make a tutorial on how to make your own script for resteem & upvoting posts.

Make your own resteem bot or upvote bot.

You could help your followers by resteeming their posts by using this tutorial
Or you could make a little by helping others by upvoting and sharing their content.

How to make your own Resteem Bot?

I will help you with everything! Just comment and upvote your query.

SEND ME 0.1 STEEM for resteeming your posts.

Use such title for your post to break a ice between community and our bot. :)

from piston.steem import Steem
from piston.steem import BroadcastingError
import threading
import time
import random
import csv

// my favorite blogs on steemit
top_writers = []

// add my favorites
my_favorites = []

// Skiplist functionality has not been added yet, this will be your personal blacklist
with open('skiplist.txt', mode='r') as infile:
reader = csv.reader(infile)
for rows in reader:
v = rows[0]
top_writers.append(v)
// Add your Account, Posting key for voting and/or Active Key for tipping
my_subscriptions = top_writers + my_favorites
account = ["your-account-name"]
posting_key = ["your-private-posting-key"]
active_key = []
// This is the range (in seconds) in which your bot will cast a vote
vote_delay = random.randrange(1200,1800)

upvote_history = []

def feed():
// Starting The Bot
print("Upvote Bot Started - Waiting for New Posts to Upvote!")
steem = Steem(wif=posting_key[0])
for comment in steem.stream_comments():

    if True: 

// Just making sure we vote for the post and not a comment.
if comment.depth == 0:

// check if we already upvoted this. Sometimes the feed will give duplicates.
if comment.identifier in upvote_history:
continue

            print("New post by @%s %s" % (comment.author, url_builder(comment)))
            workerThread = threading.Thread(name=comment.identifier, target=worker, args=(comment,))
            workerThread.start()

// Tipping Function send $0.001 in STEEM
def send_a_tip(author):
steem = Steem(wif=active_key)
steem.transfer(author, 0.001, "STEEM", memo="Keep Blogging", account=account)

def url_builder(comment):
return "https://steemit.com/%s/%s" % (comment.category, comment.identifier)

def worker(worker_comment):
time.sleep(vote_delay)
try:
for (k,v) in enumerate(account):
worker_steem = Steem(wif=posting_key[k])
upvote_comment = worker_steem.get_content(worker_comment.identifier)
// Checking if Post is flagged for Plagarism & Spam
names = ['steemcleaners', 'cheetah']
for avote in upvote_comment['active_votes']:
if (avote['voter'] in names and avote['percent'] < 0):
print("====> Upvote Skipped - Post Flagged by Cheetah or Steemcleaners")
return False
// If the post has not been flagged by Cheetah or Steemcleaners, it will now upvote the post
// with a 2 % upvote
upvote_comment.vote(2, v)
// Upvote has now been done and it will now print a message to your screen:
print("====> Post Upvoted Successfully!")
upvote_history.append(upvote_comment.identifier)
except BroadcastingError as e:
print("Upvoting failed...")
print("We have probably already upvoted this post before the author edited it.")
print(str(e))

   if upvote_comment.author in my_favorites:
     send_a_tip(upvote_comment.author)
     print("====> Sent $0.001 STEEM to @%s" % upvote_comment.author)

if name == "main":
while True:
try:
feed()
except (KeyboardInterrupt, SystemExit):
print("Quitting...")
break
except Exception as e:
traceback.print_exc()
print("////// Exception Occurred: Restarting...")

use this script and do not forget to send me SBD/STEEM minimum amount to send is 2

Sort:  

Upvote and send me 1 sbd as tip

Congratulations @therv! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 70434.55
ETH 3761.18
USDT 1.00
SBD 3.84