<center></center> For each tutorial we release there will be a relevant challenge where the winner receives 1 STEEM! ### Challenge Today's challenge is relatively simple. Take the code from the tutorial, that can be found [here](https://github.com/amosbastian/steempy-tutorials/blob/master/part_4/voting_trail.py), and add the following checks when you upvote a post: 1. Make sure the post is at least 30 minutes old That's it! Good luck to everyone participating! ### Deadline The prize money will be rewarded to the person that solve the problem first. If there is no solution within 7 days after this post has been submitted the prize pool expires. ### Relevant Tutorial [Part 4: How To Follow A Voting Trail Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-4-how-to-follow-a-voting-trail-using-steem-python) --- If you have questions about the tutorial or the challenge then don't hesitate to comment below or contact us on [Discord](https://discord.gg/rYTV87W)!
author | steempytutorials |
---|---|
permlink | daily-puzzle-201801160600553884 |
category | bot |
json_metadata | "{"tags": ["bot", "programming", "python", "contest", "community"]}" |
created | 2018-01-16 05:00:57 |
last_update | 2018-01-16 05:00:57 |
depth | 0 |
children | 15 |
last_payout | 2018-01-23 05:00:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.418 HBD |
curator_payout_value | 0.102 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,110 |
author_reputation | 31,094,047,689,691 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,861,532 |
net_rshares | 56,048,024,169 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
juliank | 0 | 41,208,952,044 | 3% | ||
matriks77 | 0 | 608,394,250 | 100% | ||
emrebeyler | 0 | 7,156,994,478 | 17% | ||
travoved | 0 | 4,382,517,045 | 70% | ||
goingmerry | 0 | 614,413,408 | 100% | ||
amosbastian | 0 | 1,830,827,637 | 100% | ||
steempytutorials | 0 | 245,925,307 | 100% |
[My solution](https://gist.github.com/emre/bdcca8de5b9506516f3be8c6efc26446)
author | emrebeyler |
---|---|
permlink | re-steempytutorials-daily-puzzle-201801160600553884-20180117t213741113z |
category | bot |
json_metadata | {"tags":["bot"],"links":["https://gist.github.com/emre/bdcca8de5b9506516f3be8c6efc26446"],"app":"steemit/0.1"} |
created | 2018-01-17 21:37:42 |
last_update | 2018-01-17 21:37:42 |
depth | 1 |
children | 3 |
last_payout | 2018-01-24 21:37:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.094 HBD |
curator_payout_value | 0.004 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 76 |
author_reputation | 448,528,959,341,273 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,259,951 |
net_rshares | 12,356,213,583 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
emrebeyler | 0 | 6,416,615,739 | 15% | ||
turbot | 0 | 5,939,597,844 | 100% |
It's not completely right, read the post carefully ;)
author | amosbastian |
---|---|
permlink | re-emrebeyler-re-steempytutorials-daily-puzzle-201801160600553884-20180118t130510656z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-18 13:05:09 |
last_update | 2018-01-18 13:05:09 |
depth | 2 |
children | 2 |
last_payout | 2018-01-25 13:05:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 53 |
author_reputation | 174,473,586,900,705 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,390,308 |
net_rshares | 0 |
aww, updated. :)
author | emrebeyler |
---|---|
permlink | re-amosbastian-re-emrebeyler-re-steempytutorials-daily-puzzle-201801160600553884-20180118t162743642z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-18 16:27:42 |
last_update | 2018-01-18 16:27:42 |
depth | 3 |
children | 1 |
last_payout | 2018-01-25 16:27:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.030 HBD |
curator_payout_value | 0.008 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 16 |
author_reputation | 448,528,959,341,273 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,430,435 |
net_rshares | 5,107,568,208 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
turbot | 0 | 5,107,568,208 | 100% |
Did u Mean like this? from steem import Steem from steem.blockchain import Blockchain from steem.post import Post voting_trail = ["amosbastian", "juliank"] template = "@{}/{}" steem = Steem() blockchain = Blockchain() stream = blockchain.stream(filter_by=["vote"]) if __name__ == '__main__': while True: try: for vote in stream: voter = vote["voter"] author = vote["author"] permlink = vote["permlink"] if voter in voting_trail: post = template.format(author, permlink) if Post(post).is_main_post(): print("Voting on {} post that {} voted on!".format( permlink, voter)) steem.vote(post, 100) except Exception as error: print(repr(error)) continue
author | matriks77 |
---|---|
permlink | re-steempytutorials-daily-puzzle-201801160600553884-20180116t053223640z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-16 05:32:27 |
last_update | 2018-01-16 05:33:09 |
depth | 1 |
children | 2 |
last_payout | 2018-01-23 05:32:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 887 |
author_reputation | 386,727,893,620 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,866,034 |
net_rshares | 0 |
Well, you didn't change anything about the given code, so not exactly. Try and complete the challenge and either upload it to GitHub, create a Gist or paste it pastebin or something and link that here, good luck!
author | amosbastian |
---|---|
permlink | re-matriks77-re-steempytutorials-daily-puzzle-201801160600553884-20180116t093533456z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-16 09:35:33 |
last_update | 2018-01-16 09:35:33 |
depth | 2 |
children | 1 |
last_payout | 2018-01-23 09:35:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 212 |
author_reputation | 174,473,586,900,705 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,901,314 |
net_rshares | 0 |
Thanks, But actually, I'm not sure what I have to do with It code, I will try!!!
author | matriks77 |
---|---|
permlink | re-amosbastian-re-matriks77-re-steempytutorials-daily-puzzle-201801160600553884-20180116t113253992z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-16 11:33:00 |
last_update | 2018-01-16 11:33:00 |
depth | 3 |
children | 0 |
last_payout | 2018-01-23 11:33:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 80 |
author_reputation | 386,727,893,620 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,919,319 |
net_rshares | 0 |
Hi, I gave this a try and I have to admit that it is pretty hard. Had to look up Steem documentation and also datetime. My solution is below: https://pastebin.com/tzshQXXb Thank you for making me learn new things.
author | sumdumphok |
---|---|
permlink | re-steempytutorials-daily-puzzle-201801160600553884-20180117t064447431z |
category | bot |
json_metadata | {"tags":["bot"],"links":["https://pastebin.com/tzshQXXb"],"app":"steemit/0.1"} |
created | 2018-01-17 06:44:48 |
last_update | 2018-01-17 06:44:48 |
depth | 1 |
children | 5 |
last_payout | 2018-01-24 06:44:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 215 |
author_reputation | 412,722,608,537 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,108,763 |
net_rshares | 0 |
You nearly got it! It's not completely right, so try again if you want to.
author | amosbastian |
---|---|
permlink | re-sumdumphok-re-steempytutorials-daily-puzzle-201801160600553884-20180118t130428484z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-18 13:04:27 |
last_update | 2018-01-18 13:04:27 |
depth | 2 |
children | 3 |
last_payout | 2018-01-25 13:04:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 74 |
author_reputation | 174,473,586,900,705 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,390,182 |
net_rshares | 643,315,190 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
sumdumphok | 0 | 643,315,190 | 100% |
https://pastebin.com/p6vL4vQ4
author | sumdumphok |
---|---|
permlink | re-amosbastian-re-sumdumphok-re-steempytutorials-daily-puzzle-201801160600553884-20180118t174843163z |
category | bot |
json_metadata | {"tags":["bot"],"links":["https://pastebin.com/p6vL4vQ4"],"app":"steemit/0.1"} |
created | 2018-01-18 17:48:42 |
last_update | 2018-01-18 17:48:42 |
depth | 3 |
children | 2 |
last_payout | 2018-01-25 17:48:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 29 |
author_reputation | 412,722,608,537 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,445,974 |
net_rshares | 0 |
Also, for future reference, do these snippets have to compile or how does "grading" work? Since the next challenge requires sending money to upvote bots, do I just find the closest match solution or it has to actually send money to upvote bots?
author | sumdumphok |
---|---|
permlink | re-sumdumphok-re-steempytutorials-daily-puzzle-201801160600553884-20180117t064800316z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-17 06:48:00 |
last_update | 2018-01-17 06:48:33 |
depth | 2 |
children | 0 |
last_payout | 2018-01-24 06:48:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 244 |
author_reputation | 412,722,608,537 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,109,236 |
net_rshares | 0 |
I will upvote old posts manually)
author | yura81 |
---|---|
permlink | re-steempytutorials-daily-puzzle-201801160600553884-20180116t095353533z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-16 09:52:24 |
last_update | 2018-01-16 09:52:24 |
depth | 1 |
children | 1 |
last_payout | 2018-01-23 09:52:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 33 |
author_reputation | 298,771,669,778 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,903,876 |
net_rshares | 0 |
Feel free to do so ;)
author | juliank |
---|---|
permlink | re-yura81-re-steempytutorials-daily-puzzle-201801160600553884-20180116t111456042z |
category | bot |
json_metadata | {"tags":["bot"],"app":"steemit/0.1"} |
created | 2018-01-16 11:14:54 |
last_update | 2018-01-16 11:15:00 |
depth | 2 |
children | 0 |
last_payout | 2018-01-23 11:14:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 21 |
author_reputation | 117,823,071,447,502 |
root_title | "Daily Puzzle" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,916,457 |
net_rshares | 0 |