파이썬 beem에서 특정 계정의 댓글 이력 조회

in NOTICE & AutoVoting8 months ago

파이썬 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)

jswit 증인 노드 프로젝트를 시작합니다.

jsup 업보팅(upvoting) 서비스 소개

jsup 수혜자 지정 기능 추가

jsup 2.0 - 업보팅을 다시 위대하게

jSTEEM 프로젝트 - 텔레그램 챗봇으로 구현하는 스팀 블럭체인 탐색기

Steemit-Search - 스팀잇 포스팅 검색

STEEM.NFT - 디지털 아트 보존 프로젝트

Sort:  

Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
image.png
please click it!
image.png
(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.

Upvoted! Thank you for supporting witness @jswit.

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 68228.72
ETH 3279.36
USDT 1.00
SBD 2.67