Viewing a response to: @steempytutorials/daily-steem-python-challenge-10-win-1-steem
Look at the Steemd for this comment. Unfortunately I think this challenge is _much_ harder than it appears if you want to get finniky with it- especially since some markdown parsers don't always work the way you expect them to. How do you tell the difference between say a [link](https://cdn.discordapp.com/attachments/404587860872921088/405329216280723458/challenge.png) that isn't really part of a post, and an image? You can also escape the ! to make an image appear as a link. Example: \ Also - can't assume that the image is going to have a [valid extension](https://stackoverflow.com/questions/5110384/can-i-use-images-without-extension-in-img). For example, this is a link if I paste it in straight up. https://steemitimages.com/DQmS9uzwXDM9HWNSM5G5EPhFd9VLi5Miva5MZdTPjcwL6rb/image Now if I add the `` it gets interpreted as an image. https://steemitimages.com/DQmS9uzwXDM9HWNSM5G5EPhFd9VLi5Miva5MZdTPjcwL6rb/image.png I think the only way to come up with a solution that really works for all platforms is to render the page on Steemit and inspect that for valid image tags with something like BeautifulSoup. Anything else will only work 99% of the time ;)
author | maxg |
---|---|
permlink | re-steempytutorials-daily-steem-python-challenge-10-win-1-steem-20180123t220924740z |
category | contest |
json_metadata | {"tags":["contest"],"image":["https://steemitimages.com/DQmS9uzwXDM9HWNSM5G5EPhFd9VLi5Miva5MZdTPjcwL6rb/image.png"],"links":["https://cdn.discordapp.com/attachments/404587860872921088/405329216280723458/challenge.png","https://stackoverflow.com/questions/5110384/can-i-use-images-without-extension-in-img","https://steemitimages.com/DQmS9uzwXDM9HWNSM5G5EPhFd9VLi5Miva5MZdTPjcwL6rb/image"],"app":"steemit/0.1"} |
created | 2018-01-23 22:09:24 |
last_update | 2018-01-23 22:09:24 |
depth | 1 |
children | 3 |
last_payout | 2018-01-30 22:09:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.338 HBD |
curator_payout_value | 0.087 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,278 |
author_reputation | 5,859,582,764,121 |
root_title | "Daily Steem-Python Challenge #10, Win 1 Steem!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 31,753,032 |
net_rshares | 39,567,608,962 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
juliank | 0 | 35,810,087,339 | 3% | ||
emrebeyler | 0 | 630,821,833 | 1% | ||
steempytutorials | 0 | 3,126,699,790 | 100% |
Took some time to go over your comment. All of your points are valid and what they truly show is how complicated a decentralised system is. All of the different apps using their own slight variations makes for these annoying exceptions. As for "render the page on Steemit and inspect that for valid image tags with something like BeautifulSoup" that sounds interesting. I have no experience with this. How I currently deal with the issue is basically verifying each post beforehand and filtering out any 1% by hand ;)
author | juliank |
---|---|
permlink | re-maxg-re-steempytutorials-daily-steem-python-challenge-10-win-1-steem-20180126t045723884z |
category | contest |
json_metadata | {"tags":["contest"],"app":"steemit/0.1"} |
created | 2018-01-26 04:57:24 |
last_update | 2018-01-26 04:57:24 |
depth | 2 |
children | 0 |
last_payout | 2018-02-02 04:57: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 | 521 |
author_reputation | 117,823,071,447,502 |
root_title | "Daily Steem-Python Challenge #10, Win 1 Steem!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,378,798 |
net_rshares | 0 |
[Steemd link](https://steemd.com/contest/@maxg/re-steempytutorials-daily-steem-python-challenge-10-win-1-steem-20180123t220924740z)
author | maxg |
---|---|
permlink | re-maxg-re-steempytutorials-daily-steem-python-challenge-10-win-1-steem-20180123t221146999z |
category | contest |
json_metadata | {"tags":["contest"],"links":["https://steemd.com/contest/@maxg/re-steempytutorials-daily-steem-python-challenge-10-win-1-steem-20180123t220924740z"],"app":"steemit/0.1"} |
created | 2018-01-23 22:11:48 |
last_update | 2018-01-23 22:11:48 |
depth | 2 |
children | 0 |
last_payout | 2018-01-30 22:11: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 | 131 |
author_reputation | 5,859,582,764,121 |
root_title | "Daily Steem-Python Challenge #10, Win 1 Steem!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 31,753,486 |
net_rshares | 0 |
This one is indeed a lot harder that you might initially think. Actually an issue I have to deal with on a daily basis :P Will be going over your code now
author | steempytutorials |
---|---|
permlink | re-maxg-re-steempytutorials-daily-steem-python-challenge-10-win-1-steem-20180125t121552195z |
category | contest |
json_metadata | {"tags":["contest"],"app":"steemit/0.1"} |
created | 2018-01-25 12:15:51 |
last_update | 2018-01-25 12:15:51 |
depth | 2 |
children | 0 |
last_payout | 2018-02-01 12:15:51 |
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 | 154 |
author_reputation | 31,094,047,689,691 |
root_title | "Daily Steem-Python Challenge #10, Win 1 Steem!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,186,617 |
net_rshares | 0 |