mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-07-22 21:13:47 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6410df3cf | ||
|
|
25811f20a0 | ||
|
|
778d8e5ef1 | ||
|
|
156c31a3f5 | ||
|
|
051a181210 |
+182
-55
@@ -1,8 +1,15 @@
|
||||
## 主要变化(2.2.8)
|
||||
- 遇到过期的cookie跳过(#51)
|
||||
<!-- markdownlint-disable MD036 MD024-->
|
||||
# CHANGELOG
|
||||
|
||||
## 主要变化(2.3.1)
|
||||
|
||||
## 问题修复
|
||||
- UP关闭评论区(#52)
|
||||
|
||||
- 该动态不能转发分享(#60)
|
||||
- 发布的动态内容未序列化(#47)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -10,14 +17,71 @@
|
||||
|
||||
_如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更说明_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.7...v2.2.8
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.3.0...v2.3.1>
|
||||
|
||||
## 主要变化(2.3.0)
|
||||
|
||||
- 私信检查所有未读消息
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
**替换可执行文件**
|
||||
|
||||
_如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更说明_
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.9...v2.3.0>
|
||||
|
||||
## 主要变化(2.2.9)
|
||||
|
||||
- 检查动态创建时间(#57)(#58)
|
||||
- 简单整理(#56)
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 非转发动态无源用户(#54)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`增加`max_create_time`
|
||||
|
||||
**替换可执行文件和更改配置文件(建议修改)**
|
||||
|
||||
_如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更说明_
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.8...v2.2.9>
|
||||
|
||||
## 主要变化(2.2.8)
|
||||
|
||||
- 遇到过期的cookie跳过(#51)
|
||||
|
||||
## 问题修复
|
||||
|
||||
- UP关闭评论区(#52)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
**替换可执行文件**
|
||||
|
||||
_如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更说明_
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.7...v2.2.8>
|
||||
|
||||
## 主要变化(2.2.7)
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 未移动分区(#50)
|
||||
- 修改线路切换逻辑
|
||||
- 修改线路切换逻辑
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -25,13 +89,15 @@ _如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更
|
||||
|
||||
_如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更说明_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.6...v2.2.7
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.6...v2.2.7>
|
||||
|
||||
## 主要变化(2.2.6)
|
||||
|
||||
- LOG日志显示随机动态内容(#47)
|
||||
- 增加设置过滤间隔
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`增加`filter_wait`
|
||||
|
||||
@@ -39,13 +105,16 @@ _如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更
|
||||
|
||||
_如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更说明_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.5...v2.2.6
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.5...v2.2.6>
|
||||
|
||||
## 主要变化(2.2.5)
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 因黑名单而关注失败(#45)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -54,38 +123,46 @@ _如果之前版本小于上一版本,请查看[CHANGELOG](CHANGELOG.md)变更
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.4...v2.2.5
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.4...v2.2.5>
|
||||
|
||||
## 主要变化(2.2.4)
|
||||
|
||||
- api线路切换具有记忆功能
|
||||
- 增加更多时延自定义值(#44)
|
||||
- 重构部分代码
|
||||
- 内置默认设置
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 清理动态时关注列表获取失败
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`增加
|
||||
- `get_session_wait` 读取下一页私信间隔
|
||||
- `update_session_wait` 已读私信间隔
|
||||
- `get_partition_wait` 读取下一页关注列表间隔
|
||||
- `get_dynamic_detail_wait` 获取动态细节间隔
|
||||
- `random_dynamic_wait` 随机动态间隔
|
||||
- `random_dynamic_wait` 随机动态间隔
|
||||
|
||||
**替换可执行文件和更改配置文件(建议修改)**
|
||||
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.3...v2.2.4
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.3...v2.2.4>
|
||||
|
||||
## 主要变化(2.2.3)
|
||||
|
||||
- clear_dynamic_type类型可以多选(#42)
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 番剧动态无user_profile(#41)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`修改`clear_dynamic_type`
|
||||
|
||||
@@ -94,12 +171,14 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.2...v2.2.3
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.2...v2.2.3>
|
||||
|
||||
## 主要变化(2.2.2)
|
||||
|
||||
- 随机转发热门视频(#40)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`增加`create_dy_mode` `create_dy_type`
|
||||
|
||||
@@ -108,13 +187,14 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.1...v2.2.2
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.1...v2.2.2>
|
||||
|
||||
## 主要变化(2.2.1)
|
||||
|
||||
- 动态不存在时出错(#39)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -123,13 +203,15 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
**Full Changelog**: https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.0...v2.2.1
|
||||
|
||||
**Full Changelog**: <https://github.com/shanmiteko/LotteryAutoScript/compare/v2.2.0...v2.2.1>
|
||||
|
||||
## 主要变化(2.2.0)
|
||||
|
||||
- 修改转发验重逻辑
|
||||
- 可间隔插入随机动态(#33)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`增加create_dy_mode
|
||||
|
||||
@@ -138,10 +220,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.8)
|
||||
|
||||
- 设置支持热更新(#29)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`文件格式更改
|
||||
- `my_config.js`文件格式更改
|
||||
|
||||
@@ -150,10 +234,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.7)
|
||||
|
||||
- 设置支持热更新(#29)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`文件格式更改
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -162,10 +248,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.6)
|
||||
|
||||
- 新增设置not_check_article(#25)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`新增设置not_check_article
|
||||
|
||||
@@ -174,10 +262,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.5)
|
||||
|
||||
- 修复之前无法更新的问题
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -186,10 +276,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.4)
|
||||
|
||||
- 黑名单处理(#22)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -198,10 +290,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.3)
|
||||
- 错误码变更(#20)
|
||||
|
||||
- 错误码变更(#20)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -210,12 +304,14 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.2)
|
||||
|
||||
- 支持arm平台运行
|
||||
- 改变账号异常应对策略
|
||||
- 修改dingtalk签名base64问题(#17)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -224,10 +320,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.1)
|
||||
|
||||
- 获取未读私信接口变化
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -236,10 +334,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.1.0)
|
||||
|
||||
- 修复两处问题
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -248,10 +348,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.0.9)
|
||||
|
||||
- 账号异常自动切换线路(#14)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -260,10 +362,12 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.0.8)
|
||||
|
||||
- 账号异常时未处理和发送通知
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -272,11 +376,13 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化(2.0.7)
|
||||
|
||||
- 修复一处问题
|
||||
- 日志时间UTC+8(#13)
|
||||
|
||||
## 较上一版本变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
@@ -285,11 +391,13 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
_如果之前版本小于上一版本,请查看**历次更新**说明_
|
||||
_[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
|
||||
## 主要变化
|
||||
|
||||
- 支持更新检查
|
||||
- 增加设置`update_loop_wait`
|
||||
|
||||
## 较上一版本(v2.0.5)变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`增加设置`update_loop_wait`
|
||||
|
||||
@@ -297,72 +405,91 @@ _[查看链接](https://github.com/shanmiteko/LotteryAutoScript/releases)_
|
||||
|
||||
_如果之前版本小于2.0.5,请查看历次更新说明_
|
||||
|
||||
|
||||
## 主要变化
|
||||
|
||||
- 不参与主站黑名单用户抽奖
|
||||
- my_config.js注释修改
|
||||
- 可从环境变量中读取COOKIE
|
||||
- 其他不影响功能的调整
|
||||
|
||||
## 较上一版本(v2.0.4)变化
|
||||
|
||||
- `env.js`无
|
||||
- `my_config.js`无
|
||||
|
||||
**仅需替换可执行文件**
|
||||
|
||||
|
||||
## 新特性
|
||||
|
||||
中奖通知设置可设黑名单
|
||||
|
||||
## 较上一版本(v2.0.3)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
**仅需替换可执行文件**
|
||||
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 评论失败未退出
|
||||
- 切割tag不精准
|
||||
|
||||
## 较上一版本(v2.0.2)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
**仅需替换可执行文件**
|
||||
|
||||
edit: 替换release
|
||||
|
||||
|
||||
## 问题修复
|
||||
#9
|
||||
|
||||
# 9
|
||||
|
||||
## 较上一版本(2.0.1)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
**仅需替换可执行文件**
|
||||
|
||||
|
||||
## 新增特性
|
||||
|
||||
增加两处自定义设置(`my_config.js`)
|
||||
|
||||
- `clear_quick_remove_attention`
|
||||
- `notice_key_words`
|
||||
|
||||
## 问题修复
|
||||
#7
|
||||
|
||||
# 7
|
||||
|
||||
## 较上一版本(2.0.0)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`需修改添加两处自定义设置
|
||||
除了替换可执行文件,还要修改`my_config.js`文件
|
||||
|
||||
|
||||
## 新增特性
|
||||
|
||||
打乱将转发的动态顺序,防止被人认出是抽奖号
|
||||
|
||||
## 问题修复
|
||||
|
||||
修复两处潜在bug
|
||||
|
||||
## 较上一版本(1.9.9)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
只需替换可执行文件
|
||||
|
||||
|
||||
## 优化体验
|
||||
|
||||
清理动态时日志更详细
|
||||
以及其他细节处理
|
||||
|
||||
## 较上一版本(1.9.8)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
只需替换可执行文件
|
||||
@@ -370,44 +497,50 @@ edit: 替换release
|
||||
edit: 1.9.9.1
|
||||
edit: 1.9.9.2
|
||||
|
||||
|
||||
## 修复Bug
|
||||
|
||||
两级解构时第一级为undefined(表现为异常退出)
|
||||
|
||||
## 较上一版本(1.9.7)变化
|
||||
|
||||
`env.js`更改注释内容
|
||||
`my_config.js`无
|
||||
只需替换可执行文件
|
||||
|
||||
## 修复Bug
|
||||
|
||||
转发专栏内的抽奖时无法获取关注
|
||||
|
||||
## 较上一版本(1.9.6)变化
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
只需替换可执行文件
|
||||
|
||||
|
||||
## 主要变化(1.9.6)
|
||||
|
||||
去除对unzipper的依赖
|
||||
专栏转发率达一半以上时跳过
|
||||
|
||||
## 较上一版本变更
|
||||
|
||||
`env.js`无
|
||||
`my_config.js`无
|
||||
只需替换可执行文件
|
||||
|
||||
|
||||
## 主要新增功能(1.9.5)
|
||||
|
||||
可从专栏里获取抽奖动态
|
||||
|
||||
## 较上一版本变更
|
||||
|
||||
`env.js`无变化
|
||||
`my_config.js`去掉部分设置,新增部分设置
|
||||
|
||||
## 1.9.0
|
||||
|
||||
修复Bug后的稳定版(大概
|
||||
|
||||
- 21/7/21 附加bat脚本增加对小白的友好性
|
||||
|
||||
## 1.8
|
||||
@@ -420,7 +553,6 @@ change 修复一处bug
|
||||
change 重新上传zip
|
||||
change 重新上传zip
|
||||
|
||||
|
||||
## 1.6
|
||||
|
||||
perf: 重构代码
|
||||
@@ -433,8 +565,6 @@ feat:
|
||||
- 滤除的dyid也进行存储
|
||||
fix: 修复部分bug
|
||||
|
||||
|
||||
|
||||
## 1.5
|
||||
|
||||
feat: 日志相关
|
||||
@@ -442,7 +572,7 @@ feat: 日志相关
|
||||
- 彩色输出
|
||||
- 环境变量LOTTERY_LOG_LEVEL更改日志等级
|
||||
feat: 设置相关
|
||||
- lottery_loop_wait 抽奖循环
|
||||
- lottery_loop_wait 抽奖循环
|
||||
- check_loop_wait 检奖循环
|
||||
- clear_loop_wait 清理循环
|
||||
|
||||
@@ -454,13 +584,10 @@ fix: 部分动态无法获取描述
|
||||
|
||||
feat: 新增loop_wait设置
|
||||
|
||||
|
||||
可执行文件压缩包
|
||||
|
||||
|
||||
# 命令行工具
|
||||
|
||||
可执行文件压缩包
|
||||
|
||||
|
||||
可执行文件压缩包
|
||||
可执行文件压缩包
|
||||
|
||||
+5
-4
@@ -36,20 +36,21 @@ async function isMe() {
|
||||
let MySession = await bili.getSessionInfo(type)
|
||||
for (const index of infiniteNumber()) {
|
||||
for (const Session of MySession.data) {
|
||||
const { content, sender_uid, session_ts, timestamp, unread_count, talker_id, msg_seqno } = Session;
|
||||
const { sender_uid, session_ts, timestamp, unread_count, talker_id, msg_seqno } = Session;
|
||||
session_t = session_ts;
|
||||
if (unread_count) {
|
||||
bili.updateSessionStatus(talker_id, type, msg_seqno);
|
||||
await delay(update_session_wait);
|
||||
const content = await bili.fetch_session_msgs(talker_id, unread_count);
|
||||
if (judge(content, notice_key_words)) {
|
||||
desp += '## 私信检测结果\n\n'
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += `发生时间: ${new Date(timestamp * 1000).toLocaleString()}\n\n`
|
||||
desp += `用户: ${sender_uid}\n\n`
|
||||
desp += `私信你(${global_var.get("myUID")})说: ${content}\n\n`
|
||||
desp += `私信你(${global_var.get("myUID")})说:\n${content}\n\n`
|
||||
desp += `[直达链接](https://message.bilibili.com/#/whisper/mid${sender_uid})\n\n`
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
}
|
||||
await bili.updateSessionStatus(talker_id, type, msg_seqno);
|
||||
await delay(update_session_wait);
|
||||
}
|
||||
}
|
||||
if (MySession.has_more && index < 16) {
|
||||
|
||||
+3
-2
@@ -229,10 +229,11 @@ const config = {
|
||||
* - 中奖通知关键词(满足一个就推送)
|
||||
* - 符合js正则表达式的字符串
|
||||
* - 若以 ~ 开头则表示为黑名单规则
|
||||
* - 优先级递增
|
||||
*/
|
||||
notice_key_words: [
|
||||
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员",
|
||||
"~有奖预约通知"
|
||||
"~预约成功|预约主题",
|
||||
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员"
|
||||
],
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ module.exports = Object.freeze({
|
||||
DYNAMIC_SVR_GET_DYNAMIC_DETAIL: 'https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/get_dynamic_detail',
|
||||
DYNAMIC_SVR_RM_DYNAMIC: 'https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/rm_dynamic',
|
||||
DYNAMIC_SVR_SPACE_HISTORY: 'https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/space_history',
|
||||
FETCH_SESSION_MSGS: 'https://api.vc.bilibili.com/svr_sync/v1/svr_sync/fetch_session_msgs',
|
||||
FEED_GET_ATTENTION_LIST: 'https://api.vc.bilibili.com/feed/v1/feed/get_attention_list',
|
||||
FEED_SETUSERFOLLOW: 'https://api.vc.bilibili.com/feed/v1/feed/SetUserFollow',
|
||||
LOTTERY_SVR_LOTTERY_NOTICE: 'https://api.vc.bilibili.com/lottery_svr/v1/lottery_svr/lottery_notice',
|
||||
|
||||
+52
-20
@@ -204,10 +204,9 @@ const bili_client = {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取私信
|
||||
* 获取一页私信
|
||||
* @typedef SessionData
|
||||
* @property {string} session_ts
|
||||
* @property {string} content
|
||||
* @property {number} timestamp
|
||||
* @property {number} unread_count
|
||||
* @property {number} sender_uid
|
||||
@@ -241,8 +240,8 @@ const bili_client = {
|
||||
data = sessions.map(session => {
|
||||
const
|
||||
{ session_ts, last_msg, unread_count, talker_id } = session,
|
||||
{ content = '', timestamp = 0, sender_uid = 0, msg_seqno } = last_msg || {};
|
||||
return { session_ts, content, timestamp, sender_uid, unread_count, talker_id, msg_seqno };
|
||||
{ timestamp = 0, sender_uid = 0, msg_seqno } = last_msg || {};
|
||||
return { session_ts, timestamp, sender_uid, unread_count, talker_id, msg_seqno };
|
||||
});
|
||||
return { has_more, data };
|
||||
} else if (res.code === 2) {
|
||||
@@ -253,6 +252,34 @@ const bili_client = {
|
||||
return { has_more: 0, data: [] };
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取私信细节
|
||||
* @param {number} talker_id
|
||||
* @param {number} size
|
||||
*/
|
||||
async fetch_session_msgs(talker_id, size) {
|
||||
const
|
||||
responseText = await get({
|
||||
url: API.FETCH_SESSION_MSGS,
|
||||
query: {
|
||||
talker_id,
|
||||
session_type: 1,
|
||||
size
|
||||
}
|
||||
}),
|
||||
res = strToJson(responseText);
|
||||
if (res.code === 0) {
|
||||
const msgs = res.data.messages
|
||||
if (msgs instanceof Array) {
|
||||
log.info('私信细节', `${talker_id}有${size}条未读私信`)
|
||||
return msgs.map(it => it.content).join('\n')
|
||||
} else {
|
||||
log.warn('私信细节', `${talker_id}无私信`)
|
||||
}
|
||||
}
|
||||
log.error('私信细节', `获取失败`)
|
||||
return ''
|
||||
},
|
||||
/**
|
||||
* 获取未读私信数量
|
||||
* @returns {Promise<{ unfollow_unread: number, follow_unread: number }>}
|
||||
@@ -694,22 +721,27 @@ const bili_client = {
|
||||
if (len > 233) {
|
||||
msg = msg.slice(0, 233 - len)
|
||||
}
|
||||
const responseText = await post({
|
||||
url: API.DYNAMIC_REPOST_REPOST,
|
||||
config: {
|
||||
retry: false
|
||||
},
|
||||
contents: {
|
||||
uid: `${uid}`,
|
||||
dynamic_id: dyid,
|
||||
content: msg,
|
||||
ctrl,
|
||||
csrf: GlobalVar.get("csrf")
|
||||
}
|
||||
});
|
||||
if (/^{"code":0/.test(responseText)) {
|
||||
const
|
||||
responseText = await post({
|
||||
url: API.DYNAMIC_REPOST_REPOST,
|
||||
config: {
|
||||
retry: false
|
||||
},
|
||||
contents: {
|
||||
uid: `${uid}`,
|
||||
dynamic_id: dyid,
|
||||
content: msg,
|
||||
ctrl,
|
||||
csrf: GlobalVar.get("csrf")
|
||||
}
|
||||
}),
|
||||
res = strToJson(responseText);
|
||||
if (res.code === 0) {
|
||||
log.info('转发动态', '成功转发一条动态');
|
||||
return 0;
|
||||
} else if (res.code === 1101004) {
|
||||
log.warn('转发动态', '该动态不能转发分享');
|
||||
return 0;
|
||||
} else {
|
||||
log.error('转发动态', `转发动态失败\n${responseText}`);
|
||||
return 1;
|
||||
@@ -751,9 +783,9 @@ const bili_client = {
|
||||
contents,
|
||||
});
|
||||
if (/^{"code":0/.test(responseText)) {
|
||||
log.info('发布动态', `成功创建一条随机内容的动态\n${content}\n`);
|
||||
log.info('发布动态', `成功创建一条随机内容的动态\n${JSON.stringify(content)}\n`);
|
||||
} else {
|
||||
log.error('发布动态', `发布动态失败\n${content}\n${responseText}`);
|
||||
log.error('发布动态', `发布动态失败\n${JSON.stringify(content)}\n${responseText}`);
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ const utils = {
|
||||
return array;
|
||||
},
|
||||
/**
|
||||
* 关键词判断
|
||||
* 关键词判断 优先级递增
|
||||
* @param {string} text
|
||||
* @param {string[]} key_words startwith '~' 表示黑名单
|
||||
* @return {boolean}
|
||||
|
||||
@@ -241,10 +241,11 @@ module.exports = Object.freeze({
|
||||
* - 中奖通知关键词(满足一个就推送)
|
||||
* - 符合js正则表达式的字符串
|
||||
* - 若以 ~ 开头则表示为黑名单规则
|
||||
* - 优先级递增
|
||||
*/
|
||||
notice_key_words: [
|
||||
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员",
|
||||
"~有奖预约通知"
|
||||
"~预约成功|预约主题",
|
||||
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员"
|
||||
],
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lottery-auto-script",
|
||||
"version": "2.2.9",
|
||||
"version": "2.3.1",
|
||||
"description": "自动参与B站动态抽奖",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -45,11 +45,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/shanmiteko/AutoScript#readme",
|
||||
"devDependencies": {
|
||||
"eslint": "^7.17.0",
|
||||
"pkg": "^5.2.1"
|
||||
"eslint": "^8.1.0",
|
||||
"pkg": "^5.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.1",
|
||||
"nodemailer": "^6.5.0"
|
||||
"chalk": "^4.1.2",
|
||||
"nodemailer": "^6.7.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user