mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
chore
This commit is contained in:
parent
b2f95ea373
commit
161794a025
109
README.md
109
README.md
@ -1,20 +1,32 @@
|
||||
# AutoScript
|
||||

|
||||
|
||||
## 动态抽奖
|
||||
通过Github Actions挂载Nodejs脚本
|
||||
> [Actions官方文档](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions)
|
||||
- [AutoScript](#autoscript)
|
||||
- [动态抽奖](#动态抽奖)
|
||||
- [操作步骤](#操作步骤)
|
||||
- [Fork本仓库](#fork本仓库)
|
||||
- [填入COOKIE](#填入cookie)
|
||||
- [微信推送中奖信息(可选)](#微信推送中奖信息可选)
|
||||
- [运行](#运行)
|
||||
- [完成!](#完成)
|
||||
- [其他细节](#其他细节)
|
||||
|
||||
---
|
||||
|
||||
## 操作步骤
|
||||
## 动态抽奖
|
||||
通过Github Actions挂载Nodejs脚本
|
||||
> [Actions官方文档](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions)
|
||||
|
||||
↓
|
||||
---
|
||||
|
||||
## 操作步骤
|
||||
|
||||
↓↓
|
||||
|
||||
### Fork本仓库
|
||||

|
||||
|
||||
↓
|
||||
↓↓
|
||||
|
||||
### 填入COOKIE
|
||||
进入[B站主页](https://www.bilibili.com/)获取Cookie用于登录
|
||||
@ -23,7 +35,7 @@ Chrome浏览器:
|
||||
2. 进入Application找到Cookies栏中的SESSDATA将HttpOnly选项**取消**勾选
|
||||
(此步骤是为了方便后续采用JS获取Cookies)
|
||||

|
||||
3. 在Console中复制以下代码回车
|
||||
3. 在Console中复制以下代码回车
|
||||
```js
|
||||
{
|
||||
let bilicookie = '';
|
||||
@ -40,10 +52,11 @@ Chrome浏览器:
|
||||

|
||||

|
||||
|
||||
也可以采用其他方式获取所需的Cookie
|
||||
也可以采用**其他方式获取**所需的Cookie
|
||||
只需含有`DedeUserID=...;SESSDATA=...;bili_jct=...`三项即可
|
||||
(分号分割,顺序随意)
|
||||
|
||||
↓
|
||||
↓↓
|
||||
|
||||
### 微信推送中奖信息(可选)
|
||||
如果想使用Server酱提供的**微信推送**服务
|
||||
@ -52,61 +65,59 @@ Chrome浏览器:
|
||||
可在`Repository secrets`中新建一个`SCKEY`并填入相应的值
|
||||

|
||||
|
||||
↓
|
||||
↓↓
|
||||
|
||||
### 运行
|
||||
### 运行
|
||||
进入Actions启用工作流
|
||||
|
||||
随便改一下此`README.md`文件并提交(Push触发)
|
||||

|
||||

|
||||
或者
|
||||
通过手动触发
|
||||
**或者**通过手动触发
|
||||

|
||||
|
||||
***以上步骤是为了检测是否配置成功***
|
||||
|
||||
至此程序将会每两小时运行一次
|
||||
至此程序将会每**两小时运行**一次
|
||||
|
||||
↓
|
||||
↓↓
|
||||
|
||||
### 完成!
|
||||
### 完成!
|
||||
效果
|
||||

|
||||
|
||||
### 更新
|
||||
> [如何同步更新Github上Fork的项目](https://www.cnblogs.com/idyllcheung/p/13555934.html)
|
||||
|
||||
---
|
||||
|
||||
## 其他细节
|
||||
支持最多5个账号
|
||||
|cookies | value |
|
||||
| ---- | ---- |
|
||||
| `COOKIE` | 值 |
|
||||
| `COOKIE2`| 值 |
|
||||
| `COOKIE3`| 值 |
|
||||
| `COOKIE4`| 值 |
|
||||
| `COOKIE5`| 值 |
|
||||
|
||||
部分设置说明
|
||||
- 定时运行(`UTC`时间)
|
||||
```yaml
|
||||
schedule:
|
||||
- cron: '0 */2 * * *'
|
||||
```
|
||||
[填写格式](https://crontab.guru/)
|
||||
- 模式选择
|
||||
```javascript
|
||||
/**
|
||||
* 默认设置
|
||||
*/
|
||||
let config = {
|
||||
model: '11',/* both */
|
||||
chatmodel: '11',/* both */
|
||||
}
|
||||
```
|
||||
[具体含义](https://github.com/shanmite/LotteryAutoScript/issues/2)
|
||||
---
|
||||
|
||||
## 其他细节
|
||||
- 更新
|
||||
> [如何同步更新Github上Fork的项目](https://www.cnblogs.com/idyllcheung/p/13555934.html)
|
||||
- 支持最多5个账号
|
||||
| cookies | value |
|
||||
| --------- | ----- |
|
||||
| `COOKIE` | 值 |
|
||||
| `COOKIE2` | 值 |
|
||||
| `COOKIE3` | 值 |
|
||||
| `COOKIE4` | 值 |
|
||||
| `COOKIE5` | 值 |
|
||||
|
||||
- 部分设置说明
|
||||
- 定时运行(`UTC`时间)
|
||||
```yaml
|
||||
schedule:
|
||||
- cron: '0 */2 * * *'
|
||||
```
|
||||
[填写格式](https://crontab.guru/)
|
||||
- 模式选择
|
||||
```javascript
|
||||
/**
|
||||
* 默认设置
|
||||
*/
|
||||
let config = {
|
||||
model: '11',/* both */
|
||||
chatmodel: '11',/* both */
|
||||
}
|
||||
```
|
||||
[具体含义](https://github.com/shanmite/LotteryAutoScript/issues/2)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ class Monitor extends Public {
|
||||
isLottery = ts > now_ts_10 && ts < now_ts_10 + maxday;
|
||||
isSendChat = chatmodel[0] === '1';
|
||||
} else if (!hasOfficialLottery && model[1] === '1') {
|
||||
if (!/奖/.test(description)) continue;
|
||||
if (!/[抽奖]/.test(description)) continue;
|
||||
ts = Base.getLotteryNotice(description).ts;
|
||||
if (!official_verify) {
|
||||
const followerNum = await BiliAPI.getUserInfo(uid);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user