@dailyupvotes Python quick-sender

in python •  7 years ago 

U5dsPn3bBj82qy7v5PsBEWCPSv8bWng.gif

Hello again,

Today I wanted to share a neat piece of code that has saved me a lot of time when sending bids to my favorite upvote bot.

Now, the config is set up to send 1 SBD to @dailyupvotes, but you can set it up for another Bot and a different amount if you wish, you only have to change the variables in the script.

Like in the other guides, you first start by creating the python file:

sudo nano dailyupvotes.py

You then paste this code:

from steem import Steem
s = Steem(keys=["YOUR ACTIVE KEY", "YOUR MEMO KEY"])
print ("welcome to dailyupvotes")
memo = input("Please provide the URL of your Post: ")
s.commit.transfer(
    "dailyupvotes", 
    1.00, 
    "SBD", 
    memo= memo, 
    account="YOUR ACCOUNT"
)
print ("your post has been succesfully submitted, thank you for using our services")

To execute you type:

python3 dailyupvotes.py

The outcome should be something like this:

Captura de pantalla 2018-03-13 a la(s) 16.46.34.png

With this script you can send bids to your favorite upvote bot in literally seconds!

Enjoy!

PS: Make sure you have the python-steem module installed, you can find @emrebeyler library here: https://github.com/emre/steem-python-dshot

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

You might need to validate memos :)

def memo_is_valid(steemd_instance, memo):

    try:
        p = Post(memo, steemd_instance=steemd_instance)
    except ValueError as e:
        if 'Invalid identifier' in e.args[0]:
            return False
        raise
    except steembase.exceptions.PostDoesNotExist:
        return False

    return True

Hey!! that is a real cool addition to the bot! thanks!

Have you looked into alternatives to storing your wif in cleartext in the file system?

I understand that it can be done via environmental variables but was having issues yesterday getting it working.

I just manually enter my BIP38 wallet passphrase for the time being but that is less than ideal. If you figure it out, would be good to know!

Good article. If I were one to use bid bots, Python would be a good way to perform batch operations to multiple bots.

The memo validation recommended by @emrebeyler is also a good touch.

wow....good job....i think python is the best program language...and i waiting for your next post with python....thanks brother..

your thought really good.its very important thing for all steemians friend.its matter we should be knowing. python is the best program language... so,i am waiting your upcoming post.thanks dear @chitty

Interesant, thanks

Wow amigo debe ser difícil trabajar con esos códigos, se ven un poco difíciles pero leyendo tus post lo haces ver mas fácil, gracias por compartir tu información, saludos desde Venezuela :D

You got a 40.00% upvote from @dailyupvotes courtesy of @hcf27!

python code you try to using steemit. it really a good idea and i think it develop our steemit system, activity, working process. thanks for sharing this post.


This is a bit over my head but seems interesting.

Hi Chitty. I would love to start programming a some python scripts. Especially since cli_wallet won't install for me on Linux. I left you a message and @emrebeyler a message that sat here for 5 days unanswered. I am deleting it now because it takes up half the page.

If there is no response, I will remove this bulky post within a couple days. I waited 5 days. Now I don't remember nor care what the errors were.