GentBG x PUSSTEEM - burning both STEEM and PUSS

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-x-pussteem-burning-both-steem-and-puss Hello, this is @joviansummer(witness: @jswit), developer of GentBG project. I registered @gentbg account to PUSSTEEM about a week ago and donated some of my own PUSS token to @gentbg's EPUSS account. Now, @gentbg will burn STEEM and EPUSS at the same time. PUSSTEEM's boosting upvotes will help increasing baseline burning significantly. @gentbg's SP reward is delegate to @jsup to get automated upvotes, forming a baseline burning of liquid reward independent of other people's upvotes. Some may argue 100%(both liquid and SP reward) burning is much better, but I chose this approach to prevent @gentbg from becoming a spamming account. Constantly asking for upvotes via mentioning and commenting every week may eventually become a big annoyance to curators. That being said, anyone is welcome to participate in countering STEEM inflation by giving upvotes ...

파이썬에서 스팀잇 웹접속을 통한 최근 포스팅 주소(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포스팅 강박에서 벗어나기