SCT에 글이 등록안되서 한번더 올린글인데... 다시 뜨네요 ㅜㅜ
그래서 부랴부랴 글 하나 더 올립니다.
오늘 올라온 글에 goodhello 님의 최신글의 코드를 python에 설치하고 적용해봤습니다. 아주 잘되더군요.!
근데, 문제가 하나 있었습니다. 클레임되는 금액(?)을 표시하도록 했는데.. 그 수치가 정확하지 않았습니다. (정확하지 않다기보단 rawdata여서 후처리를 해야되는것 같았습니다.)
해결과정에서 holger80님의 github 소스를 참고했습니다.
import time
from beem import Steem
from beem.nodelist import NodeList
from steemengine.wallet import Wallet
from steemengine.tokenobject import Token
import json
import requests
def scot_claim_token():
username = "유저명"
url = "http://scot-api.steem-engine.com/@" + username
r = requests.get(url)
result = r.json()
json_data = []
for token in result:
scot = result[token]
if int(scot["pending_token"]) > 0:
token_info = Token(token);
json_data.append({"symbol": token})
scot["pending_token"] = (scot["pending_token"] / pow(10,token_info['precision']))
print("%s can be %s claimed" % (token,scot["pending_token"]))
if len(json_data) > 0:
print(time.strftime('%Y-%m-%d %HH:%MM:%SS', time.localtime(time.time())))
nodes = NodeList()
nodes.update_nodes()
stm = Steem(nodes.get_nodes())
pwd = "포스팅키"
try:
stm.unlock(pwd)
except:
stm = Steem(node=nodes.get_nodes(), keys=[pwd])
stm.custom_json("scot_claim_token", json_data, required_posting_auths=[username])
for symbol in json_data:
print("%s has been claimed" % (symbol['symbol']))
else:
pass
def run():
while True:
scot_claim_token()
time.sleep(60)
if __name__ == '__main__':
run()
수정전
수정후
Your PRIVATE POSTING KEY has been compromised. Any malicious person can POST, COMMENT, or VOTE from your account. Please change your MASTER PASSWORD as soon as possible.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Your PRIVATE POSTING KEY has been compromised. Any malicious person can POST, COMMENT, or VOTE from your account. Please change your MASTER PASSWORD as soon as possible.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you!
It's corrected.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for your continued support towards JJM. For each 1000 JJM you are holding, you can get an additional 1% of upvote. 10,000JJM would give you a 11% daily voting from the 700K SP virus707 account.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
블랙리스트 인가봅니다.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
허허허...그럴리가~
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
이거 개이득이네 다음에 한번 더써먹을슈 잌ㅅ자나
Posted using Partiko iOS
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
내용 바꿨지롱.ㅋㅋ
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
소스 공유 감사합니다. 같이 꿀 빨겠습니다. ㅎㅎ
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
꿀꿀꿀.ㅋㅋㅋㅋ
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
이거 어떻게 쓰는거야??? 형!!
그냥 복사해서 넣으면 돼는거여??
ㅋㅋㅋ 이해할수 있도록 포스팅해줘 ㅋ
초보 카카도 전혀 어렵지 않게~~~
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
ㅎㅎㅎ. 서버가 있어야되..ㅜㅜ
python을 쓸수 있는.ㅋㅋ
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
그렇다...골드형은 사실 개발자였다... ㅎㅎㅎ
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
그렇다고 한다.ㅋㅋㅋ
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit