STEEM POWER retention ratio of top 50 witnesses

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/steem-power-retention-ratio-of-top-50-witnesses Hello, this is @joviansummer(witness: @jswit). Some time ago there was a bit of discussion on discord witness chanel about witnesses' power-down/cashing-out. So out of curiosity I just checked current ratio of witnesses' own STEEM POWER(VESTS) and all-time producer reward(VESTS). The ratio is calculated by the following simple formula: ratio(%) = account's own SP(MV) / all-time producer reward SP(MV) * 100% Ratio value less than 100% indicates power-down. If witness does additional power-up or gets other types of reward(e.g., curation reward), the ratio may exceed 100%. This does not take witness' other accounts into consideration. All-time producer reward data is from @steemchiller's SDS API. Here is the result: rank account own_sp prod_sp ratio 1 justyy 2188.411MV 1284.2MV 170.41% 2 steemchiller 982.134MV 124...

파이썬에서 스팀잇 웹접속을 통한 최근 포스팅 주소(url) 확인

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/url


jsup/templar-kr 업보팅 서비스 보완을 위한 작업과 관련하여 필요한 사항이라 메모해 둡니다. 보완 방안에 대한 내용은 아래의 링크입니다.

jsup/templar-kr 업보팅 서비스 보완 방안 https://steemit.com/hive-141029/@joviansummer/7j3zha-jsup-templar-kr

최근 포스팅 목록을 api 서버를 통하지 않고 steemit.com 웹서버에 접속해서 확인하는 방법입니다. 파이썬의 requests 모듈을 활용합니다.

스팀잇 사용자의 포스팅 목록의 접속 주소는, 예를 들어 joviansummer의 포스팅 목록은 https://steemit.com/@joviansummer/posts에 있습니다. requests를 이용해서 웹 접속에 대한 응답을 받아올 수 있습니다.

import requests

steem_id = 'joviansummer'
post_list_url = 'https://steemit.com/@' + steem_id + '/posts'
# HTTP GET 요청으로 포스트 목록 받아오기 
response = requests.get(post_list_url)

위와 같이 하면 response.text에 응답으로 온 html 데이터가 문자열(string) 형식으로 저장됩니다. 우선 html 태그(tag)의 시작 지점인 '<' 기준으로 여러 줄로 분할합니다.

# 태그 시작점을 기준으로 줄바꿈(\n)을 추가하여 multiline_response에 할당
multiline_response = response.text.replace('<','\n<')

각 포스트의 주소는 아래와 같은 형태의 항목에서 확인 가능합니다.

\<a class="timestamp__link" href="/hive-196917/@joviansummer/jsup-sp-vote-weight" data-reactid="735">

따라서, 각 행별로 'timestamp__link' 문자열이 있는지 확인하여 이 부분만 따로 모아서 리스트(list)로 만들 수 있습니다.

post_links = []
for line in multiline_response.split('\n'):
  if line.find('timestamp__link') >=0:
    href_data = line.split('"')[3]
    post_links.append(href_data)

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기