Stuck with Python Steem Programming

in #python7 years ago

I am struggling with something I thought was going to be super easy but is not proving to be!

I want to retrieve comments from a particular post using python, I thought get_content_replies would do the trick and whilst it returns a lot of information the comment is not showing at all.

I have also tried get_replies on the post object but that also doesn't get the comments, I have searched high and low and can find no answer.

If someone can point me in the right direction I would be most grateful

Sort:  
Loading...

I use some of the tools here to pull a plethora of information from the blockchain. It doesn't belong to me though its by @justyy

Thanks for sharing this, I had already stumbled upon this and its a great bunch of tools. Unfortunately neither this or anywhere else on the Net show code to display comments on a post, there are functions to get comments but not on a particular post, though getcontentreplies should work. Anyway thanks for taking the time to write.

I'm just beginning to learn programming so I can't be a resource here but I think you've got some smart horse betting posts and I'm curious if you plan to do the same for the MLB season or the NBA playoffs? I live in Las Vegas and have the same betting apps. Good luck with your python hurdle.

Thanks for the message, I am UK based so I am not too up on American sports so don't bet on them as much as I would like too. Always welcome some tips and i'll do them on here.

Awesome, my bad I'm just seeing this reply and I hear ya, I'm not too up on any sports at the moment but I love the betting, my fav part of living here.

The last few seasons I had some decent luck sticking to round-robin parlays that only included the home team when they were +1.5. Since the only way the home team can bat in the bottom of the 9th is if they are losing or the game is tied, the -1.5 at home seems like a trap for home optimists.

I will try my best to get my upvotes on time and will try to start sending some MLB pics when I notice. Cheers!

I don't know how to retrieve comments unfortunately. I don't know how hard it is to view mentions on python? If you know how people could mention an unused account maybe as to not mention you loads?

I could suggest steemworld.org in the meantime

It lets you filter comments on a post based on content so all comments with the correct code are shown. You would then need to manually copy and paste the names though :/

Thanks for this, I forgot about steemworld thanks for reminding me of that.

You got a 34.19% upvote from @brandonfrye courtesy of @stimp1024!

Want to promote your posts too? Send a minimum of .10 SBD or Steem to @brandonfrye with link in the memo for an upvote on your post. You can also delegate to our service for daily passive earnings which helps to support the @minnowfund initiative. Learn more here

This post, with over $50.00 in bidbot payouts, has received votes from the following:

smartsteem payout in the amount of $44 USD.
promobot payout in the amount of $22 USD.
upme payout in the amount of $6 USD.
brandonfrye payout in the amount of $2 USD.
estabond payout in the amount of $1 USD.
brupvoter payout in the amount of $1 USD.

For a total calculated bidbot upvote value in the amount of $76 USD.

This information is being presented in the interest of transparency on our platform @stimp1024 and is by no means a judgement of your work.

Loading...

You got a 9.00% upvote from @brupvoter courtesy of @stimp1024!

You got a 8.15% upvote from @dailyupvotes courtesy of @stimp1024!

Please upvote this comment to support the service.

Thanks to all who replied to this request for help, all this help led me to the following post https://cnsteem.com/utopian-io/@amosbastian/add-moderator-s-review-comment-to-utopian-info-database which gave away the fact that you need to loop through the post object:

for post in Post.get_all_replies(Post(permlink)):

then each comment can be obtained with:

post["body"]

In case anyone else is having problems with comments

Great! Just saw this now, but if you ever need help with steem-python related stuff (or Python) you can contact me on Discord at Amos#4622. I'm always willing to help!

@amosbastian thanks for the offer, its good to know there is a someone available when you get stuck. Also thanks for posting that article, that was the only piece of code I could find that showed how to get those comments so I owe you massively for that. It is a slow function like you say in that post but I can put up with that for my requirements.

Coin Marketplace

STEEM 0.13
TRX 0.34
JST 0.036
BTC 109207.95
ETH 4399.20
USDT 1.00
SBD 0.84