@shenchensucc 在这篇帖子 YY 了一个 最低保障系统 但是这并不能保障点赞的内容都是好内容. 我们总不能对只有一张图片或者几句话的帖子进行点赞吧.
所以, 我想了一下, 为什么不弄一个优质机器人自动点赞呢? 虽然网上有一些现成的代码, 但是我下面介绍的这个有几方面的优势:
- 只限于中文区 CN 主标签 或者是微信群成员列表的帖子.
- 文章的作者必须在过去7天 潜在收益排行前30.
- 根据排名给予不同的点赞权重, 例如第1到第10名的帖子80%, 第11-15名点赞权重65% 等以此类推.
- 支持黑名单(如果作者的水贴太多)
- 点赞机器人会在第30到90分钟内点赞(因为这个可是我自己的投票能量给你们点的, 也得让我收益一点嘛).
- 点赞机器人在服务器上每10分钟跑一次.
- 点赞机器人在投票能量不足的情况下会主动休息.
为什么叫`优质内容`点赞机器人?
- 这是假设前30名的作者都是优质作者, 产生优质内容的概率较大.
- 这个每日排行榜变动还是挺大的, 因为如果你几天不写, 那么就会跌出排行榜, 这可不像声誉, SP或者财富即使几天不更新 可能大鱼们还是能稳坐排行榜.
优质内容点赞机器人 TODO
- 观察投票文章的质量
- 统计自动机器人投票的点赞收益 (Curation Rewards)
- 每日自动投票记录和报告发表在 每日排行榜里.
- 优化投票权重和加入其它一些对劣质文章的过滤, 比如文章太短等.
优质内容点赞机器人核心代码
仅供参考:
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
GD Star Rating
loading...
本文一共 591 个汉字, 你数一下对不对.loading...
上一篇: SteemIt 高级定制微信文章列表 RSS/API/阅读器 v2.0
下一篇: SteemIt 获取微信群成员关注和粉丝的API
扫描二维码,分享本文到微信朋友圈
看到代码依然一脸懵逼, 怎么才能弄个自己的机器人咧
机器人很简单的, 用PYTHON的那个STEEM库就很容易, GITHUB上有很多示例代码, 改改就好了.