파이썬 beem을 이용해서 특정 계정의 댓글 이력을 조회할 수 있습니다. Account 객체의 comment_history() 함수를 이용하며, 제네레이터(generator) 형식으로 가져옵니다. 예시를 보면 감을 잡을 수 있을 것입니다.
from beem import Steem
from beem.account import Account
s = Steem(node="https://api.steemit.com")
a = Account('joviansummer', blockchain_instance=s)
# 최근 5개의 댓글 가져오기
c_hist = a.comment_history(limit=5)
# 댓글 Comment 객체를 하나씩 가져와 출력
for reply in c_hist:
# 댓글 작성자(author) -> 본문 작성자(parent author)
print(reply.author, '->', reply.parent_author)
# Comment 객체의 내용 출력
print(reply.body)
print(" ")
comment_history 함수에서 limit 값을 지정하지 않으면 API 노드에서 줄 수 있는 최대한 많은 댓글을 가져올 수 있습니다.
@joviansummer의 스팀 프로젝트
스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)
Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Upvoted! Thank you for supporting witness @jswit.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@jsup !blog
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Blogger url: http://joviansummer.blogspot.com/2024/01/beem.html
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit