mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
fix: 因黑名单而关注失败(#45)
This commit is contained in:
parent
c3c8ffba95
commit
dd234691ea
32
README.md
32
README.md
@ -98,11 +98,25 @@ Chrome浏览器:
|
||||
3. 在`env.js`中填入`COOKIE`和推送参数
|
||||
4. 在`my_config.js`中自定义设置
|
||||
5. 在当前目录下**打开终端**运行可执行文件`lottery`(勿直接点击`lottery`)
|
||||
- `lottery start` 启动抽奖
|
||||
- `lottery check` 检测中奖
|
||||
- `lottery clear` 清理动态
|
||||
```sh
|
||||
# unix-like
|
||||
## 进入脚本所在目录
|
||||
## 授予执行权限
|
||||
$ chmod u+x lottery
|
||||
## 启动脚本
|
||||
$ ./lottery start
|
||||
## 检测中奖
|
||||
$ ./lottery check
|
||||
## 清理关注动态
|
||||
$ ./lottery clear
|
||||
## 下载最新版本
|
||||
$ ./lottery clear
|
||||
|
||||
或者 新建文本文档写入`lottery start`然后更改扩展名为.bat点击运行(已自带start.bat可直接点击)
|
||||
# windows
|
||||
## 不需要chmod
|
||||
## 把`./`换成`.\`或去掉
|
||||
## 已自带*.bat可直接点击
|
||||
```
|
||||
7. 运行截图
|
||||

|
||||
|
||||
@ -177,12 +191,12 @@ npm i && npm run clear
|
||||
1.初始化
|
||||
|
||||
```bash
|
||||
curl -fsSL https://cdn.staticaly.com/gh/shanmiteko/LotteryAutoScript/main/script/docker/init.sh | sh
|
||||
$ curl -fsSL https://cdn.staticaly.com/gh/shanmiteko/LotteryAutoScript/main/script/docker/init.sh | sh
|
||||
```
|
||||
|
||||
进入`lottery`文件夹
|
||||
```bash
|
||||
cd lottery
|
||||
$ cd lottery
|
||||
```
|
||||
|
||||
编辑`env.js`与`my_config.js`文件
|
||||
@ -194,7 +208,7 @@ cd lottery
|
||||
|
||||
例如:
|
||||
```bash
|
||||
./start.sh
|
||||
$ ./start.sh
|
||||
```
|
||||
|
||||
2.更新
|
||||
@ -208,8 +222,8 @@ cd lottery
|
||||
进入lottery上一级目录
|
||||
|
||||
```bash
|
||||
docker image rm -f shanmite/lottery_auto_docker
|
||||
rm -rf lottery/
|
||||
$ docker image rm -f shanmite/lottery_auto_docker
|
||||
$ rm -rf lottery/
|
||||
```
|
||||
|
||||
----------------------------------------
|
||||
|
||||
@ -129,6 +129,8 @@ class Monitor extends Searcher {
|
||||
status = await this.go(Lottery)
|
||||
switch (status) {
|
||||
case 0:
|
||||
case 9:
|
||||
case 19:
|
||||
break;
|
||||
case 22:
|
||||
is_exception = true
|
||||
@ -321,7 +323,9 @@ class Monitor extends Searcher {
|
||||
* @param {LotteryOptions} option
|
||||
* @returns {Promise<number>}
|
||||
* 0 - 成功
|
||||
* 9 - 评论黑名单
|
||||
* 11 - 评论错误
|
||||
* 19 - 关注黑名单
|
||||
* 21 - 关注错误
|
||||
* 22 - 关注异常
|
||||
* 31 - 转发失败
|
||||
|
||||
@ -572,6 +572,8 @@ const bili_client = {
|
||||
return [null, 0]
|
||||
case 22002:
|
||||
return ['您已被对方拉入黑名单', -1]
|
||||
case 22003:
|
||||
return ['黑名单用户无法关注', -1]
|
||||
case 22015:
|
||||
return ['账号异常', 2]
|
||||
default:
|
||||
@ -867,7 +869,7 @@ const bili_client = {
|
||||
log.error('自动评论', '黑名单用户无法互动');
|
||||
return -1;
|
||||
default:
|
||||
log.error('自动评论', `评论失败\n${responseText}`);
|
||||
log.error('自动评论', `未知错误\n${responseText}`);
|
||||
return 1;
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lottery-auto-script",
|
||||
"version": "2.2.4",
|
||||
"version": "2.2.5",
|
||||
"description": "自动参与B站动态抽奖",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
8
script/unix-like/update.sh
Normal file
8
script/unix-like/update.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
./lottery update
|
||||
|
||||
if [[ -r "latest_version.zip" ]]; then
|
||||
unzip latest_version.zip
|
||||
rm latest_version.zip
|
||||
chmod u+x lottery
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user