A Good-Content-Upvote SteemIt Bot for CN Community


I have created a steemit upvote bot that aims to vote for quality contents. It is based on the assumption that the authors on the daily top 30 ranking table are more likely to produce the good contents.

steemit-bot A Good-Content-Upvote SteemIt Bot for CN Community python SteemIt

steemit-bot

This daily rank table provides the ranking sorted from the potential payout for authors in the last 7 days. Depending on the ranking, different upvoting weight is used e.g. 80% for top 10 authors and 65% for 11 to 15th.

The bot runs on the server every 10 minutes and it will take a break (do nothing) if @justyy’s voting power is less than 30. The bot supports a blacklist so I will constantly observe and update the list.

If you want to be considered, you need to be in the steemit wechat group and write really good contents with main tag CN. Even if you are top of the table, you can still fall out if you do not write constantly good contents.

The core python code of the upvoting bot (for your reference) is given following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
def getWeight(rank):
  weight = 0
  if rank <= 10:
    weight = 1.6
  elif rank <= 15:
    weight = 1.3
  elif rank <= 20:
    weight = 1.2
  elif rank <= 25:
    weight = 1
  else:
    weight = 0.5
  return weight
  
if True:    
  rank = 0  
  for x in good:
    rank = rank + 1
    try:   
      blog = Blog(x)
      print("No. " + str(rank) + " = " + x)
      for p in blog.take(1):
        p_date = p['created']
        sec = HowManySeconds(p_date) 
        print("minutes = " + str(sec / 60))
        if sec >= 30*60 and sec <= 90*60:
          url = "@" + x + "/" + p['permlink']
          for y in acc:
            vp = get_vp(y)
            print("voting power for " + y + " is " + str(vp))
            weight = getWeight(rank)
            print("weight = " + str(weight))
            score = vp * 0.5 * weight
            if vp >= 30:            
              print(y + " " + str(score) + " votes for " + url)
              vote(y, account[y], url, score)
            else:
              print("vp low, skipped.")
    except:
      print("Error - " + x)
        
print("OK.")
def getWeight(rank):
  weight = 0
  if rank <= 10:
    weight = 1.6
  elif rank <= 15:
    weight = 1.3
  elif rank <= 20:
    weight = 1.2
  elif rank <= 25:
    weight = 1
  else:
    weight = 0.5
  return weight
  
if True:    
  rank = 0  
  for x in good:
    rank = rank + 1
    try:   
      blog = Blog(x)
      print("No. " + str(rank) + " = " + x)
      for p in blog.take(1):
        p_date = p['created']
        sec = HowManySeconds(p_date) 
        print("minutes = " + str(sec / 60))
        if sec >= 30*60 and sec <= 90*60:
          url = "@" + x + "/" + p['permlink']
          for y in acc:
            vp = get_vp(y)
            print("voting power for " + y + " is " + str(vp))
            weight = getWeight(rank)
            print("weight = " + str(weight))
            score = vp * 0.5 * weight
            if vp >= 30:            
              print(y + " " + str(score) + " votes for " + url)
              vote(y, account[y], url, score)
            else:
              print("vp low, skipped.")
    except:
      print("Error - " + x)
        
print("OK.")

You may also like: SteemIt CN 区优质内容点赞机器人上线了!

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
436 words
Last Post: Interview Question: What is the difference between List and Dictionary in Python?
Next Post: SteemIt API - Two APIs to get the followers and following list in the Wechat Group

The Permanent URL is: A Good-Content-Upvote SteemIt Bot for CN Community

Leave a Reply