如何使用steem python计算一个帖子的curation (2)? by python-dev

View this thread on steempeak.com
· @python-dev ·
$0.59
如何使用steem python计算一个帖子的curation (2)?
首先要读取帖子的所有信息,代码如下:

~~~
import json
from steem.post import Post

post = Post('python-dev/steem-python-curation-1')

# write post data
with open('post_data.json', 'w') as fp:
	json.dump(post,fp, indent=4,default=str)
~~~

在‘active_votes’ key 下面可以看到当前所有点赞人的具体信息


![](https://cdn.steemitimages.com/DQmXqwyHS664GzQ21e7ZGRDc2M6mFFE4g9BrjgSiyC2VM8W/image.png)
👍  , , , , , , , , , , , , , , , , ,
properties (23)
post_id64,443,554
authorpython-dev
permlinksteem-python-curation-2
categorypython
json_metadata{"image":["https:\/\/cdn.steemitimages.com\/DQmXqwyHS664GzQ21e7ZGRDc2M6mFFE4g9BrjgSiyC2VM8W\/image.png"],"app":"steemit\/0.1","tags":["python"],"format":"markdown"}
created2018-10-17 23:51:30
last_update2018-10-17 23:51:30
depth0
children2
net_rshares484,397,736,842
last_payout2018-10-24 23:51:30
cashout_time1969-12-31 23:59:59
total_payout_value0.446 SBD
curator_payout_value0.141 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length354
author_reputation5,194,641,198,313
root_title"如何使用steem python计算一个帖子的curation (2)?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (18)
@saint-knight ·
$0.43
代码非常简洁啊,点赞信息里面只有 rshare的信息,rshare跟SP是什么关系? 如何计算?期待下一步的计算代码。
👍  
properties (23)
post_id64,443,707
authorsaint-knight
permlinkre-python-dev-steem-python-curation-2-20181017t235619360z
categorypython
json_metadata{"app":"steemit\/0.1","tags":["python"]}
created2018-10-17 23:56:18
last_update2018-10-17 23:56:18
depth1
children0
net_rshares429,470,419,986
last_payout2018-10-24 23:56:18
cashout_time1969-12-31 23:59:59
total_payout_value0.394 SBD
curator_payout_value0.034 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length59
author_reputation2,761,284,220,511
root_title"如何使用steem python计算一个帖子的curation (2)?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @python-dev! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x70/http://steemitboard.com/notifications/firstpayout.png)](http://steemitboard.com/@python-dev) You got your First payout
[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png)](http://steemitboard.com/@python-dev) Award for the number of upvotes received

<sub>_Click on the badge to view your Board of Honor._</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
post_id64,516,836
authorsteemitboard
permlinksteemitboard-notify-python-dev-20181019t042943000z
categorypython
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2018-10-19 04:29:42
last_update2018-10-19 04:29:42
depth1
children0
net_rshares0
last_payout2018-10-26 04:29:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length843
author_reputation38,705,954,145,809
root_title"如何使用steem python计算一个帖子的curation (2)?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000