Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新特性:添加主动对接龙三连 #8

Open
freshgeek opened this issue Aug 3, 2022 · 3 comments
Open

新特性:添加主动对接龙三连 #8

freshgeek opened this issue Aug 3, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@freshgeek
Copy link
Owner

新特性:添加主动对接龙三连

@freshgeek
Copy link
Owner Author

freshgeek commented Aug 4, 2022

简单介绍一下背景:

  1. 首先脚本缺少了主动发起的逻辑,只有被动返回三连
  2. 每天可能没有人给你点三连,所以我们主动出击,不然每天的评论、点赞额度就浪费了(需要注意开了主动,再被动反我们就亏了一次,注意哦)

逻辑:

  1. 复制接龙过来
  2. 解析出文本中的url , 这里是用正则匹配 "http.*[0-9,a-z,A-Z]"
  3. 考虑到是短链,所以做了短链解析 top.chen.fansback.common.util.LinkUtil#getLongerLink(java.lang.String) 借助hutool 的http请求
  4. 解析之后存在长参数,这个会对我们评论唯一key干扰(评论过的文章就别再评论了,评论每日有限,文章评论过多也没用),所以做了去除,这里也向hutool提了issue: hutool #issue 2509
  5. 然后拿到长链接,开始循环评论、点赞、收藏
  6. 同样是之前的脚本复用,不需要可以注释掉任意一个三连,所以也依赖被动回三连的配置评论、收藏夹id这些

@freshgeek
Copy link
Owner Author

freshgeek commented Aug 4, 2022

本次PR分支为 : dev/issue_8 预计今天晚上PR 进master分支
添加了评论文案、点赞日限制开关、评论日限制开关、主动三连、部分工具单元测试

@freshgeek freshgeek added the done the code has commited wait PR label Aug 4, 2022
@freshgeek freshgeek mentioned this issue Aug 4, 2022
@freshgeek
Copy link
Owner Author

还有一个 关注 没有实现,想尝试PR 可以试试

@freshgeek freshgeek added enhancement New feature or request and removed done the code has commited wait PR labels Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant