create account

Adding functionality to the Winfrey Vote Bot by grey580

View this thread on: hive.blogpeakd.comecency.com
· @grey580 · (edited)
$0.36
Adding functionality to the Winfrey Vote Bot
<html>
<p>=First off a big thanks to @fyrstikken and everyone else that worked on the <a href="https://steemit.com/upvote-bot/@fyrstikken/updated-winfrey-upvote-bot-will-vote-for-everyone-who-post-on-steemit-with-a-2-upvote-except-posts-flagged-by-cheetah-or">Winfrey Bot</a>. And also thanks to @thebatchman for doing this <a href="https://github.com/TheBatchman/steemit-autovoter">great addition</a> to the Winfrey Bot.</p>
<p><img src="http://i.imgur.com/RQaoV4t.png" width="589" height="640"/></p>
<p>I began using the bot over the weekend. And I must say it worked fantastically. However I was wondering if I could automatically import the list of users that I follow. Rather than typing them out manually in the bot scrypt i n order to vote at 100% voting power.</p>
<p>Unfortunately the version of python steem that I'm using doesn't have this functionality. But luckily enough I was able to find a <a href="https://steemit.com/steem/@cryptomental/piston-who-are-your-followers">post on steemit</a> by @cryptomental. In it he outlined a class you could use to see who you are following and who your followers were.</p>
<p>I adapted his class as follows.</p>
<p>The first thing we need to do is import the following:</p>
<blockquote>from steemapi.steemnoderpc import SteemNodeRPC</blockquote>
<p>Once you import SteemNodeRPC &nbsp;you are able to query the api with this class.</p>
<blockquote># begin finding who we follow<br>
# start call to SteemNodeRPC<br>
class FollowMe(object):<br>
&nbsp;&nbsp;&nbsp;def __init__(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.rpc = SteemNodeRPC("wss://node.steem.ws", "", "", apis=["follow"])<br>
<br>
&nbsp;&nbsp;&nbsp;# get who we follow<br>
&nbsp;&nbsp;&nbsp;def following(self,account):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return &nbsp;[ f['following'] for f in self.rpc.get_following(account, "", "blog", 100, api="follow") ]</blockquote>
<p>Once you have this class somewhere accessible. You can instantiate the class with the folowing.</p>
<blockquote># call FollowMe<br>
f = FollowMe()<br>
# set the iamfollowinglist. Currently we are just grabbing the first line. Eventually we can loop through this if &nbsp;we want.<br>
iamfollowing = f.following(account[0])<br>
#print iamfollowing to see if it got anything. Comment out if you don't want to see this<br>
#print("followers %s" % iamfollowing)</blockquote>
<p>And finally we can append the iamfollowing list to the my_subscriptions list. Or really anywhere else we wish.</p>
<blockquote>my_subscriptions = top_writers + my_favorites + iamfollowing</blockquote>
<p>In addition to this. If we wanted to vote for everyone following us. We could create a followers function.</p>
<blockquote>&nbsp;&nbsp;def followers(self, account): &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return [ f['follower'] for f in self.rpc.get_followers(account, "", "blog", 100, api="follow") ] &nbsp;</blockquote>
<p>Thanks for taking the time to read this post. I hope you enjoyed my small improvement to this bot.</p>
<p><br></p>
<p><strong>EDIT</strong></p>
<p>I need to add that we also have to append iamfollowing variable to the my_fovorites variable.</p>
<blockquote>my_fovorites = my_favorites + iamfollowing</blockquote>
<p>This needs to be done in order for the bot to actually vote your favorites at 100% voting power. I'll keep testing.</p>
<p>I've put the entire code on pastebin. <a href="http://pastebin.com/n2WPMrWY">Click Here</a> to view it.</p>
<p><strong>UPDATE: BroadcastingError</strong></p>
<p>If you are encountering this error when you run your script. It's because the newer version of piston steem is not backwards compatible.&nbsp;</p>
<p>You must install an earlier version of python steem. Uninstall piston/steem related libraries with pip3.&nbsp;</p>
<p>Then install steem with the following.</p>
<blockquote>pip3 install steem==0.3.1</blockquote>
<p>This worked for me just fine. After spending a few days trying to figure out this issue.</p>
<p>UPDATE 2/15/2017</p>
<p>I forked @thebatchman github repository. If your interested in forking or downloading via git. It's here.</p>
<p>https://github.com/grey580/steemit-autovoter</p>
<p><br></p>
<p><br></p>
</html>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 86 others
properties (23)
authorgrey580
permlinkadding-functionality-to-the-winfrey-vote-bot
categoryupvote-bot
json_metadata{"tags":["upvote-bot","tip-bot","plagiarism","steemit","print"],"users":["fyrstikken","thebatchman","cryptomental"],"image":["http://i.imgur.com/RQaoV4t.png"],"links":["https://steemit.com/upvote-bot/@fyrstikken/updated-winfrey-upvote-bot-will-vote-for-everyone-who-post-on-steemit-with-a-2-upvote-except-posts-flagged-by-cheetah-or","https://github.com/TheBatchman/steemit-autovoter","https://steemit.com/steem/@cryptomental/piston-who-are-your-followers","http://pastebin.com/n2WPMrWY","https://github.com/grey580/steemit-autovoter"],"app":"steemit/0.1","format":"html"}
created2017-02-08 04:34:18
last_update2017-02-15 19:08:00
depth0
children10
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.279 HBD
curator_payout_value0.080 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,239
author_reputation11,869,709,267,081
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,450,873
net_rshares5,735,546,640,297
author_curate_reward""
vote details (150)
@darth-azrael ·
Anybody know why I get the following error when using the winfrey bot?

ImportError: cannot import name 'BroadcastingError'

Used to work but quit working after I did an update to the steem libraries a while back.
👍  
properties (23)
authordarth-azrael
permlinkre-grey580-adding-functionality-to-the-winfrey-vote-bot-20170208t191752916z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-08 19:17:51
last_update2017-02-08 19:17:51
depth1
children5
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length213
author_reputation214,394,563,055,829
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,456,277
net_rshares4,521,723,535
author_curate_reward""
vote details (1)
@bola ·
I have been getting that error for a month now as well. I went on steemit-chat, and know one helped me out with that issue, actually no one responded to the question. I hope someone here can explain why there is a broadcasting error on all the bots that are released on steemit.
properties (22)
authorbola
permlinkre-darth-azrael-re-grey580-adding-functionality-to-the-winfrey-vote-bot-20170208t211541466z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-08 21:15:51
last_update2017-02-08 21:15:51
depth2
children1
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length278
author_reputation51,245,914,991,562
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,457,159
net_rshares0
@darth-azrael · (edited)
I think there is more wrong that that too. I tried removing the code that handled that error but then the bot never cast any votes. I think there were some fundamental changes in the newest version of the steem python libraries that broke this but I haven't seen a fix and I don't know how or if it is possible to go back to an older version. Anyone trying to follow instructions to install one of these bots and the necessary prerequisites today will not have success though.
properties (22)
authordarth-azrael
permlinkre-bola-re-darth-azrael-re-grey580-adding-functionality-to-the-winfrey-vote-bot-20170208t211827144z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-08 21:18:27
last_update2017-02-08 21:19:36
depth3
children0
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length476
author_reputation214,394,563,055,829
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,457,188
net_rshares0
@grey580 · (edited)
The problem lies squarely with your version of python steem or piston.
You will need to uninstall them and install python steem version 0.3.1

pip3 install steem==0.3.1
👍  
properties (23)
authorgrey580
permlinkre-darth-azrael-re-grey580-adding-functionality-to-the-winfrey-vote-bot-20170209t003843055z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-09 00:38:42
last_update2017-02-09 00:41:42
depth2
children2
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length168
author_reputation11,869,709,267,081
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,458,575
net_rshares3,160,271,825
author_curate_reward""
vote details (1)
@darth-azrael ·
Thanks! That fixed the problem. I figured that was the issue but I wasn't sure how to specify a specific version or which version to install.
properties (22)
authordarth-azrael
permlinkre-grey580-re-darth-azrael-re-grey580-adding-functionality-to-the-winfrey-vote-bot-20170209t142051701z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-09 14:20:51
last_update2017-02-09 14:20:51
depth3
children1
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length141
author_reputation214,394,563,055,829
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,462,906
net_rshares0
@karenmckersie · (edited)
Love your winfrey bot ! Looks very cool !💙👍💙
properties (22)
authorkarenmckersie
permlinkre-grey580-adding-functionality-to-the-winfrey-vote-bot-20170208t161707095z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-08 16:17:15
last_update2017-02-08 16:17:45
depth1
children2
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length44
author_reputation280,862,618,735,740
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,455,005
net_rshares0
@grey580 ·
Well I can't take credit for it. @fyrstikken and others were the ones who created it. 
I'm just adding to the functionality.
👍  
properties (23)
authorgrey580
permlinkre-karenmckersie-re-grey580-adding-functionality-to-the-winfrey-vote-bot-20170208t165137243z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"users":["fyrstikken"],"app":"steemit/0.1"}
created2017-02-08 16:51:36
last_update2017-02-08 16:51:36
depth2
children1
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length124
author_reputation11,869,709,267,081
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,455,253
net_rshares1,564,208,181
author_curate_reward""
vote details (1)
@karenmckersie ·
Cool !👍
properties (22)
authorkarenmckersie
permlinkre-grey580-re-karenmckersie-re-grey580-adding-functionality-to-the-winfrey-vote-bot-20170208t170921640z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-08 17:09:27
last_update2017-02-08 17:09:27
depth3
children0
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7
author_reputation280,862,618,735,740
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,455,394
net_rshares0
@michaelstobiersk ·
Outstanding!
properties (22)
authormichaelstobiersk
permlinkre-grey580-adding-functionality-to-the-winfrey-vote-bot-20170211t080945753z
categoryupvote-bot
json_metadata{"tags":["upvote-bot"],"app":"steemit/0.1"}
created2017-02-11 08:09:45
last_update2017-02-11 08:09:45
depth1
children0
last_payout2017-03-11 16:55:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation28,639,834,562,096
root_title"Adding functionality to the Winfrey Vote Bot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,477,880
net_rshares0