Created
October 13, 2018 17:06
-
-
Save ausbitbank/395c8ffc26c42d1d34e846e664a1f7f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from beem import Steem | |
from beem.account import Account | |
from beem.comment import Comment | |
import getpass | |
from time import sleep | |
import sys | |
desiredcurationpenalty=0 | |
if len(sys.argv)!=3: | |
permlink=getpass.getpass(prompt='What the permlink ? (author/post)') | |
votepower=getpass.getpass(prompt='What vote % ? (0-100)') | |
elif len(sys.argv)==3: | |
permlink=sys.argv[1] | |
votepower=sys.argv[2] | |
key=getpass.getpass(prompt='Whats the private posting key for the voting account ?') | |
steem = Steem(keys=[key]) | |
user=steem.wallet.getAccountFromPrivateKey(key) | |
print('Key belongs to ',user) | |
account = Account(user, steem_instance=steem) | |
post = Comment(permlink,steem_instance=steem) | |
print('Checking curation penalty on',permlink,':') | |
curationpenalty = post.get_curation_penalty() | |
print('Current penalty is',curationpenalty,' and desired penalty is',desiredcurationpenalty) | |
while curationpenalty > desiredcurationpenalty: | |
sleep(30) | |
curationpenalty = post.get_curation_penalty() | |
print('Curation penalty',curationpenalty) | |
post.upvote(weight=votepower, voter=user) | |
print(user,'voted',permlink,'at',votepower,'%') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment