小赖子的英国生活和资讯

SteemIt CN 区优质内容点赞机器人上线了!

阅读 桌面完整版
steemit-bot SteemIt CN 区优质内容点赞机器人上线了! I.T. SteemIt 技术

steemit-bot

@shenchensucc这篇帖子 YY 了一个 最低保障系统 但是这并不能保障点赞的内容都是好内容. 我们总不能对只有一张图片或者几句话的帖子进行点赞吧.

所以, 我想了一下, 为什么不弄一个优质机器人自动点赞呢? 虽然网上有一些现成的代码, 但是我下面介绍的这个有几方面的优势:

所以, 你想自动被 @justyy 点赞, 那么:

为什么叫`优质内容`点赞机器人?

优质内容点赞机器人 TODO

优质内容点赞机器人核心代码

仅供参考:

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.")

Q: 以潜在收益前30判断是否为优质内容, 这样是否会错过一些内容优质, 但却没人点赞的新手内容呢?
A: 最开始可能会, 但是如果你坚持个几天, 每天都是优质内容, 这样上榜的概率还是挺大的, 是吧?

英文: A Good-Content-Upvote SteemIt Bot for CN Community

强烈推荐

微信公众号: 小赖子的英国生活和资讯 JustYYUK

阅读 桌面完整版
Exit mobile version