mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 01:20:08 +08:00
[update] VipPoint
This commit is contained in:
parent
df8f192ac3
commit
b827132931
19
README.md
19
README.md
@ -1,8 +1,8 @@
|
||||
<p align="center"><img width="300px" src="https://user-images.githubusercontent.com/19500576/118621710-36428180-b7f9-11eb-891d-3f5697347cef.png" alt=""></p>
|
||||
<p style="text-align: center;"><img width="300px" src="https://user-images.githubusercontent.com/19500576/118621710-36428180-b7f9-11eb-891d-3f5697347cef.png" alt=""></p>
|
||||
|
||||
[//]: # (<p align="center"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>)
|
||||
[//]: # (<p style="text-align: center;"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>)
|
||||
|
||||
<div align="center">
|
||||
<div style="text-align: center;">
|
||||
|
||||
[](https://github.com/lkeme/ )
|
||||

|
||||
@ -27,7 +27,7 @@
|
||||
[//]: # (<br>)
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<p style="text-align: center;">
|
||||
|
||||
<img src="https://img.shields.io/badge/Version-2.2.0.230806-orange.svg?longCache=true&style=for-the-badge" alt="">
|
||||
<img src="https://img.shields.io/badge/PHP-8.1+-green.svg?longCache=true&style=for-the-badge" alt="">
|
||||
@ -53,8 +53,8 @@
|
||||
|
||||
## 👤 游客访问
|
||||
|
||||
<p align="center">
|
||||
<img alingn="center" src="https://profile-counter.glitch.me/BiliHelper-personal/count.svg" alt=""/>
|
||||
<p style="text-align: center;">
|
||||
<img style="text-align: center;" src="https://profile-counter.glitch.me/BiliHelper-personal/count.svg" alt=""/>
|
||||
|
||||
[//]: # ( <br>)
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
如果觉得本项目好用,对你有所帮助,欢迎打赏支持本项目,请作者喝杯奶茶可乐哦。
|
||||
|
||||
<p align="center"><img width="680px" src="https://user-images.githubusercontent.com/19500576/118621834-55d9aa00-b7f9-11eb-9de2-6cfd5e8f20e6.png"></p>
|
||||
<p style="text-align: center;"><img width="680px" src="https://user-images.githubusercontent.com/19500576/118621834-55d9aa00-b7f9-11eb-9de2-6cfd5e8f20e6.png" alt=""></p>
|
||||
|
||||
[comment]: <> ()
|
||||
|
||||
@ -92,7 +92,7 @@ Group: [602815575](https://jq.qq.com/?_wv=1027&k=UaalVexM) | **请不要来问
|
||||
以下任务都是按设定周期自动执行,`true`为正常使用,`false`为暂停使用或抛弃。
|
||||
|
||||
[//]: # (<details open><summary>点击展开</summary>)
|
||||
<details><summary><strong><code>已经藏起来啦~~ 点击展开 嘻嘻~</code></strong></summary></code>
|
||||
<details><summary><strong><code>已经藏起来啦~~ 点击展开 嘻嘻~</code></strong></summary>
|
||||
|
||||
<br>
|
||||
|
||||
@ -117,7 +117,6 @@ Group: [602815575](https://jq.qq.com/?_wv=1027&k=UaalVexM) | **请不要来问
|
||||
| DailyGold | 0.0.1 | 每日电池(APP) | Lkeme | 1114 | 24(小时) | √ |
|
||||
| PolishMedal | 0.0.1 | 点亮灰色勋章 | possible318/Lkeme | 1115 | 1(小时) | √ |
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
## 🖥️星图
|
||||
@ -130,7 +129,7 @@ Group: [602815575](https://jq.qq.com/?_wv=1027&k=UaalVexM) | **请不要来问
|
||||
|
||||
效果图不代表当前版本,请以当前最新版本运行结果为准。
|
||||
|
||||
<p align="center"><img width="680px" src="https://user-images.githubusercontent.com/19500576/118621918-6853e380-b7f9-11eb-8c73-e041c402a56b.png" alt=""></p>
|
||||
<p style="text-align: center;"><img width="680px" src="https://user-images.githubusercontent.com/19500576/118621918-6853e380-b7f9-11eb-8c73-e041c402a56b.png" alt=""></p>
|
||||
|
||||
[comment]: <> ()
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
|
||||
class JsonFileManager
|
||||
{
|
||||
private string $filename;
|
||||
@ -109,7 +108,7 @@ class HttpServer
|
||||
'seccode' => $seccode,
|
||||
];
|
||||
$this->json->write($data);
|
||||
$this->toResponse(10003);
|
||||
$this->toResponse(10003);
|
||||
return;
|
||||
}
|
||||
if ($path === '/fetch' && $method === 'GET') {
|
||||
@ -117,9 +116,9 @@ class HttpServer
|
||||
$challenge = $_GET['challenge'];
|
||||
$data = $this->json->read();
|
||||
if (empty($data[$challenge])) {
|
||||
$this->toResponse(10001, '暂未获取到验证结果');
|
||||
$this->toResponse(10001, '暂未获取到验证结果');
|
||||
} else {
|
||||
$this->toResponse(10000, '成功获取到验证结果', $data[$challenge]);
|
||||
$this->toResponse(10000, '成功获取到验证结果', $data[$challenge]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -90,6 +90,7 @@ a {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 4px rgb(32 107 196 / 25%);
|
||||
}
|
||||
|
||||
.form-control:disabled {
|
||||
background-color: #f1f5f9;
|
||||
opacity: 1;
|
||||
@ -123,6 +124,7 @@ a {
|
||||
background-color: #437cff;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#success {
|
||||
background-color: #2fb344;
|
||||
cursor: default;
|
||||
|
||||
@ -14,49 +14,49 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="title">极验手动验证</div>
|
||||
<div class="form">
|
||||
<label class="form-label">gt</label>
|
||||
<input type="text" class="form-control" id="gt" placeholder="请输入 gt">
|
||||
</div>
|
||||
<div class="form">
|
||||
<label class="form-label">challenge</label>
|
||||
<input type="text" class="form-control" id="challenge" placeholder="请输入 challenge">
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="title">极验手动验证</div>
|
||||
<div class="form">
|
||||
<label class="form-label">gt</label>
|
||||
<input type="text" class="form-control" id="gt" placeholder="请输入 gt">
|
||||
</div>
|
||||
<div class="form">
|
||||
<label class="form-label">challenge</label>
|
||||
<input type="text" class="form-control" id="challenge" placeholder="请输入 challenge">
|
||||
</div>
|
||||
|
||||
<div id="captcha">
|
||||
<div id="gen" class="btn">生成验证码</div>
|
||||
<div id="success" class="btn hide">验证成功</div>
|
||||
<div id="wait" class="hide">
|
||||
<div class="loading">
|
||||
<div class="loading-dot"></div>
|
||||
<div class="loading-dot"></div>
|
||||
<div class="loading-dot"></div>
|
||||
<div class="loading-dot"></div>
|
||||
</div>
|
||||
<div id="captcha">
|
||||
<div id="gen" class="btn">生成验证码</div>
|
||||
<div id="success" class="btn hide">验证成功</div>
|
||||
<div id="wait" class="hide">
|
||||
<div class="loading">
|
||||
<div class="loading-dot"></div>
|
||||
<div class="loading-dot"></div>
|
||||
<div class="loading-dot"></div>
|
||||
<div class="loading-dot"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="result" class="hide">
|
||||
<div class="result-title">验证结果</div>
|
||||
<div class="form">
|
||||
<label class="form-label">new-challenge</label>
|
||||
<input type="text" class="form-control" id="new-challenge" style="cursor: text;" disabled>
|
||||
</div>
|
||||
<div class="form">
|
||||
<label class="form-label">validate</label>
|
||||
<input type="text" class="form-control" id="validate" style="cursor: text;" disabled>
|
||||
</div>
|
||||
<div class="form">
|
||||
<label class="form-label">seccode</label>
|
||||
<input type="text" class="form-control" id="seccode" style="cursor: text;" disabled>
|
||||
</div>
|
||||
<div class="btn" id="result-btn">提交反馈结果</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toast-box">消息</div>
|
||||
<div id="result" class="hide">
|
||||
<div class="result-title">验证结果</div>
|
||||
<div class="form">
|
||||
<label class="form-label">new-challenge</label>
|
||||
<input type="text" class="form-control" id="new-challenge" style="cursor: text;" disabled>
|
||||
</div>
|
||||
<div class="form">
|
||||
<label class="form-label">validate</label>
|
||||
<input type="text" class="form-control" id="validate" style="cursor: text;" disabled>
|
||||
</div>
|
||||
<div class="form">
|
||||
<label class="form-label">seccode</label>
|
||||
<input type="text" class="form-control" id="seccode" style="cursor: text;" disabled>
|
||||
</div>
|
||||
<div class="btn" id="result-btn">提交反馈结果</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toast-box">消息</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
script.async = true;
|
||||
|
||||
// 对geetest的静态资源添加 crossOrigin
|
||||
if ( /static\.geetest\.com/g.test(url)) {
|
||||
if (/static\.geetest\.com/g.test(url)) {
|
||||
script.crossOrigin = "anonymous";
|
||||
}
|
||||
|
||||
@ -258,7 +258,8 @@
|
||||
pt: pt,
|
||||
exception_url: url,
|
||||
error_code: config.error_code
|
||||
}, function (err) {})
|
||||
}, function (err) {
|
||||
})
|
||||
}
|
||||
|
||||
var throwError = function (errorType, config) {
|
||||
@ -298,11 +299,11 @@
|
||||
config.api_server = 'yumchina.geetest.com';
|
||||
}
|
||||
|
||||
if(userConfig.gt){
|
||||
if (userConfig.gt) {
|
||||
window.GeeGT = userConfig.gt
|
||||
}
|
||||
|
||||
if(userConfig.challenge){
|
||||
if (userConfig.challenge) {
|
||||
window.GeeChallenge = userConfig.challenge
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ window.onload = function () {
|
||||
dataType: 'json',
|
||||
data: {
|
||||
challenge: challengeInput.value,
|
||||
new_challenge : newChallengeInput.value,
|
||||
new_challenge: newChallengeInput.value,
|
||||
validate: validateInput.value,
|
||||
seccode: seccodeInput.value
|
||||
},
|
||||
|
||||
@ -12,7 +12,7 @@ enable = false
|
||||
url = "http://localhost:50001"
|
||||
```
|
||||
|
||||
### 如何开启验证码手动识别服务地址
|
||||
### 如何开启验证码手动识别服务地址
|
||||
|
||||
> 需要手动开启配置开关`enable = true`,并且配置`url`为验证码手动识别服务地址。
|
||||
|
||||
@ -28,7 +28,6 @@ docker run -itd --rm -e CAPTCHA=1 -e CAPTCHA_HOST=localhost -e CAPTCHA_PORT=5000
|
||||
-e CAPTCHA_PORT=50002 # 验证码手动识别服务地址 默认 50001 需要注意端口映射关系
|
||||
```
|
||||
|
||||
|
||||
> 注意:如果你使用的是`docker-compose`,请参考`docker-compose.yml`文件中的`captcha`服务配置。
|
||||
|
||||
##### 本地用户
|
||||
@ -40,8 +39,7 @@ cd captcha && php -S localhost:50002
|
||||
|
||||
> 验证码处理目录在`captcha`目录下,可以自行修改。
|
||||
|
||||
|
||||
### 如何使用验证码手动识别服务地址
|
||||
### 如何使用验证码手动识别服务地址
|
||||
|
||||
在开启验证码手动识别服务地址后,登录模块会自动显示手动地址。复制地址到浏览器中打开,会显示相应的界面。
|
||||
|
||||
|
||||
41
docs/DOC.md
41
docs/DOC.md
@ -1,8 +1,8 @@
|
||||
<p align="center"><img width="300px" src="https://user-images.githubusercontent.com/19500576/118621710-36428180-b7f9-11eb-891d-3f5697347cef.png"></p>
|
||||
<p style="text-align: center;"><img width="300px" src="https://user-images.githubusercontent.com/19500576/118621710-36428180-b7f9-11eb-891d-3f5697347cef.png" alt=""></p>
|
||||
|
||||
[comment]: <> (<p align="center"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>)
|
||||
[comment]: <> (<p style="text-align: center;"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>)
|
||||
|
||||
<div align="center">
|
||||
<div style="text-align: center;">
|
||||
|
||||
[](https://github.com/lkeme/ )
|
||||

|
||||
@ -64,7 +64,9 @@
|
||||
<details>
|
||||
<summary>其余镜像 展开查看</summary>
|
||||
<pre><code>
|
||||
|
||||
+ cnpkg(全量镜像)
|
||||
|
||||
```shell script
|
||||
# 使用帮助
|
||||
> https://php.cnpkg.org/
|
||||
@ -108,7 +110,8 @@
|
||||
> composer config -g repos.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn
|
||||
```
|
||||
|
||||
</code></pre>
|
||||
</code>
|
||||
</pre>
|
||||
</details>
|
||||
|
||||
## 使用指南
|
||||
@ -176,19 +179,20 @@ $ php app.php
|
||||
9. 单个或者多个插件测试
|
||||
|
||||
```shell
|
||||
$ php app.php test m:d -p plugin
|
||||
$ php app.php test m:d -P plugin,plugin1
|
||||
$ php app.php test m:d -p VipPoint
|
||||
$ php app.php test m:d -p plugin # 单个插件
|
||||
$ php app.php test m:d -p VipPoint # 单个插件示例
|
||||
$ php app.php test m:d -P plugin,plugin1 # 多个插件
|
||||
$ php app.php test m:d -P VipPoint,Lottery # 多个插件
|
||||
```
|
||||
|
||||
<p align="center"><img width="680px" src="https://user-images.githubusercontent.com/19500576/118621472-f8455d80-b7f8-11eb-9fec-500148a566b4.png"></p>
|
||||
<p style="text-align: center;"><img width="680px" src="https://user-images.githubusercontent.com/19500576/118621472-f8455d80-b7f8-11eb-9fec-500148a566b4.png" alt=""></p>
|
||||
|
||||
[comment]: <> (<p align="center"><img width="680px" src="https://i.loli.net/2018/04/21/5adb497dc3ece.png"></p>)
|
||||
[comment]: <> (<p style="text-align: center;"><img width="680px" src="https://i.loli.net/2018/04/21/5adb497dc3ece.png"></p>)
|
||||
|
||||
## Docker使用指南
|
||||
|
||||
<strong>🌐 镜像加速器</strong>(部分网络原因导致拉取镜像失败)<br/><br/>
|
||||
<details><summary><strong><code>已经藏起来啦~~ 点击展开 嘻嘻~</code></strong></summary></code>
|
||||
<details><summary><strong><code> ~</code></strong></summary>
|
||||
|
||||
> 以下是通用系统配置,部分特殊系统修改可能不一样,请自行搜索解决。
|
||||
|
||||
@ -196,7 +200,7 @@ $ php app.php test m:d -p VipPoint
|
||||
|
||||
```json
|
||||
{
|
||||
"registry-mirrors":[
|
||||
"registry-mirrors": [
|
||||
"https://0b27f0a81a00f3560fbdc00ddd2f99e0.mirror.swr.myhuaweicloud.com",
|
||||
"https://dockerproxy.com",
|
||||
"https://hub-mirror.c.163.com",
|
||||
@ -210,10 +214,10 @@ $ php app.php test m:d -p VipPoint
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
<br>
|
||||
</details>
|
||||
|
||||
|
||||
1. 安装好[Docker](https://yeasy.gitbooks.io/docker_practice/content/install/)
|
||||
2. 直接命令行拉取镜像后运行
|
||||
|
||||
@ -231,7 +235,10 @@ $ docker run -itd --rm -e USER_NAME=你的B站登录账号 -e USER_PASSWORD=你
|
||||
|
||||
[//]: # (2. 修改)
|
||||
|
||||
1. 下载 [配置文件夹](https://github.com/lkeme/BiliHelper-personal/tree/master/profile) `注意是文件夹,可以完整下载后提出来`
|
||||
1.
|
||||
|
||||
下载 [配置文件夹](https://github.com/lkeme/BiliHelper-personal/tree/master/profile) `注意是文件夹,可以完整下载后提出来`
|
||||
|
||||
2. 重命名 `profile/example -> profile/user` , 修改 `profile/user/config/user.ini`
|
||||
3. 通过下面的命令进行挂载并运行
|
||||
|
||||
@ -355,10 +362,10 @@ stdout_logfile=/tmp/bilibili.log
|
||||
|
||||
脚本出现 error 级别的报错,会调用通知地址进行提醒,这里推荐两个服务
|
||||
|
||||
|服务|官网|
|
||||
|---|---|
|
||||
|Server酱|https://sc.ftqq.com/|
|
||||
|TelegramBot|https://core.telegram.org/bots/api|
|
||||
| 服务 | 官网 |
|
||||
|-------------|------------------------------------|
|
||||
| Server酱 | https://sc.ftqq.com/ |
|
||||
| TelegramBot | https://core.telegram.org/bots/api |
|
||||
|
||||
示范如下
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ class DailyGold extends BasePlugin
|
||||
$filteredArray = array_filter($filteredArray, function ($element) {
|
||||
return ($element['status'] == 2);
|
||||
});
|
||||
if ($filteredArray){
|
||||
if ($filteredArray) {
|
||||
Log::info("每日电池: 任务已经完成,可以领取奖励");
|
||||
return -2;
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ class MainSite extends BasePlugin
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
$logs = $response['data']['list'] ;
|
||||
$logs = $response['data']['list'];
|
||||
$coins = 0;
|
||||
//
|
||||
foreach ($logs as $log) {
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
|
||||
trait Bonus
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
@ -33,7 +32,7 @@ trait Bonus
|
||||
return true;
|
||||
}
|
||||
//
|
||||
$this->worker($data, $name, $title, $code,1);
|
||||
$this->worker($data, $name, $title, $code, 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
39
plugin/VipPoint/Traits/DressBuyAmount.php
Normal file
39
plugin/VipPoint/Traits/DressBuyAmount.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Website: https://mudew.com/
|
||||
* Author: Lkeme
|
||||
* License: The MIT License
|
||||
* Email: Useri@live.cn
|
||||
* Updated: 2023 ~ 2024
|
||||
*
|
||||
* _____ _ _ _ _ _ _____ _ _____ _____ _____
|
||||
* | _ \ | | | | | | | | | | | ____| | | | _ \ | ____| | _ \ & /l、
|
||||
* | |_| | | | | | | | | |_| | | |__ | | | |_| | | |__ | |_| | (゚、 。 7
|
||||
* | _ { | | | | | | | _ | | __| | | | ___/ | __| | _ / \、゙ ~ヽ *
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
trait DressBuyAmount
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function dressBuyAmount(array $data, string $name): bool
|
||||
{
|
||||
$title = '日常任务';
|
||||
$code = 'dressbuyamount';
|
||||
//
|
||||
if ($this->isComplete($data, $name, $title, $code)) {
|
||||
return true;
|
||||
}
|
||||
//
|
||||
return $this->worker($data, $name, $title, $code, 4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
40
plugin/VipPoint/Traits/DressView.php
Normal file
40
plugin/VipPoint/Traits/DressView.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Website: https://mudew.com/
|
||||
* Author: Lkeme
|
||||
* License: The MIT License
|
||||
* Email: Useri@live.cn
|
||||
* Updated: 2023 ~ 2024
|
||||
*
|
||||
* _____ _ _ _ _ _ _____ _ _____ _____ _____
|
||||
* | _ \ | | | | | | | | | | | ____| | | | _ \ | ____| | _ \ & /l、
|
||||
* | |_| | | | | | | | | |_| | | |__ | | | |_| | | |__ | |_| | (゚、 。 7
|
||||
* | _ { | | | | | | | _ | | __| | | | ___/ | __| | _ / \、゙ ~ヽ *
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
trait DressView
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function dressView(array $data, string $name): bool
|
||||
{
|
||||
$title = '日常任务';
|
||||
$code = 'dress-view';
|
||||
//
|
||||
if ($this->isComplete($data, $name, $title, $code)) {
|
||||
return true;
|
||||
}
|
||||
//
|
||||
$this->worker($data, $name, $title, $code, 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -26,10 +26,17 @@ trait PointInfo
|
||||
*/
|
||||
public function pointInfo(array $data, string $name): bool
|
||||
{
|
||||
$now = date('Y-m-d H:i:s', $data['data']['current_ts']);
|
||||
$ts = date('Y-m-d H:i:s', $data['data']['current_ts']);
|
||||
$point = $data['data']['point_info']['point'];
|
||||
|
||||
Log::notice("大会员积分@{$name}: 截至 {$now} 您当前拥有 {$point} 个积分");
|
||||
Log::notice("大会员积分@$name: 截至 $ts 您当前拥有 $point 个积分");
|
||||
//
|
||||
$score_limit = $data['data']['task_info']['score_limit'];
|
||||
$score_month = $data['data']['task_info']['score_month'];
|
||||
Log::notice("大会员积分@$name: 本月已经获得 $score_month/$score_limit 大积分");
|
||||
//
|
||||
$base_score = $data['data']['task_info']['sing_task_item']['base_score'];
|
||||
$sign_count = $data['data']['task_info']['sing_task_item']['count'];
|
||||
Log::notice("大会员积分@$name: 已连续签到 $sign_count 天 获取到 $base_score 个大积分");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
|
||||
trait Privilege
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
@ -24,7 +23,7 @@ trait Privilege
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function privilege(array $data, string $name):bool
|
||||
public function privilege(array $data, string $name): bool
|
||||
{
|
||||
$title = '体验任务';
|
||||
$code = 'privilege';
|
||||
@ -33,7 +32,7 @@ trait Privilege
|
||||
return true;
|
||||
}
|
||||
//
|
||||
$this->worker($data, $name, $title, $code,1);
|
||||
$this->worker($data, $name, $title, $code, 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
|
||||
trait ViewAnimate
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
|
||||
trait ViewFilmChannel
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
@ -34,7 +33,7 @@ trait ViewFilmChannel
|
||||
return true;
|
||||
}
|
||||
//
|
||||
$this->worker($data, $name, $title, $code,2, $channel);
|
||||
$this->worker($data, $name, $title, $code, 2, $channel);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \ じしf_, )ノ
|
||||
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
|
||||
*/
|
||||
|
||||
trait ViewVipMall
|
||||
{
|
||||
use CommonTaskInfo;
|
||||
@ -33,7 +32,7 @@ trait ViewVipMall
|
||||
return true;
|
||||
}
|
||||
//
|
||||
$this->worker($data, $name, $title, $code,3);
|
||||
$this->worker($data, $name, $title, $code, 3);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
|
||||
use Bhp\Api\Api\X\VipPoint\ApiTask;
|
||||
use Bhp\Cache\Cache;
|
||||
use Bhp\Log\Log;
|
||||
use Bhp\Plugin\BasePlugin;
|
||||
@ -39,6 +40,8 @@ class VipPoint extends BasePlugin
|
||||
use BuyVipProduct;
|
||||
use BuyVipMall;
|
||||
use PointInfo;
|
||||
use DressView;
|
||||
use DressBuyAmount;
|
||||
|
||||
/**
|
||||
* 插件信息
|
||||
@ -54,6 +57,16 @@ class VipPoint extends BasePlugin
|
||||
'cycle' => '5(分钟)', // 运行周期
|
||||
];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $home_task = 'https://big.bilibili.com/mobile/bigPoint/task';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $home = 'https://big.bilibili.com/mobile/bigPoint';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -69,9 +82,11 @@ class VipPoint extends BasePlugin
|
||||
* @var array|string[]
|
||||
*/
|
||||
protected array $target_tasks = [
|
||||
'signIn' => '签到任务',
|
||||
'bonus' => '福利任务',
|
||||
'privilege' => '体验任务',
|
||||
// 'dressUp' => '使用免费体验装扮权益',
|
||||
|
||||
'signIn' => '每日签到',
|
||||
'bonus' => '大会员福利大积分',
|
||||
'privilege' => '浏览大会员权益页面',
|
||||
'viewAnimate' => '浏览追番频道页10秒',
|
||||
'viewFilmChannel' => '浏览影视频道页10秒',
|
||||
'viewVipMall' => '浏览会员购页面10秒',
|
||||
@ -79,7 +94,9 @@ class VipPoint extends BasePlugin
|
||||
'buyVipVideo' => '购买单点付费影片',
|
||||
'buyVipProduct' => '购买指定大会员产品',
|
||||
'buyVipMall' => '购买指定会员购商品',
|
||||
'pointInfo' => '已有积分'
|
||||
'dressView' => '浏览装扮商城主页',
|
||||
'dressBuyAmount' => '购买装扮',
|
||||
'pointInfo' => '积分信息'
|
||||
];
|
||||
|
||||
/**
|
||||
@ -174,7 +191,7 @@ class VipPoint extends BasePlugin
|
||||
*/
|
||||
protected function getTaskList(): bool
|
||||
{
|
||||
$response = \Bhp\Api\Api\X\VipPoint\ApiTask::combine();
|
||||
$response = ApiTask::combine();
|
||||
if ($response['code']) {
|
||||
Log::warning('大会员积分: 获取任务列表失败');
|
||||
return false;
|
||||
|
||||
@ -62,6 +62,7 @@ class ApiTask
|
||||
$user = User::parseCookie();
|
||||
//
|
||||
$url = 'https://api.bilibili.com/pgc/activity/score/task/receive';
|
||||
// $url = 'https://api.bilibili.com/pgc/activity/score/task/receive/v2';
|
||||
$payload = [
|
||||
'taskCode' => $task_code,
|
||||
'csrf' => $user['csrf'],
|
||||
@ -82,6 +83,7 @@ class ApiTask
|
||||
$user = User::parseCookie();
|
||||
//
|
||||
$url = 'https://api.bilibili.com/pgc/activity/score/task/complete';
|
||||
// $url = 'https://api.bilibili.com/pgc/activity/score/task/complete/v2';
|
||||
$payload = [
|
||||
'taskCode' => $task_code,
|
||||
'csrf' => $user['csrf'],
|
||||
|
||||
@ -43,7 +43,8 @@ class ApiCaptcha
|
||||
* @param array $captcha
|
||||
* @return array
|
||||
*/
|
||||
public static function ocr(array $captcha):array{
|
||||
public static function ocr(array $captcha): array
|
||||
{
|
||||
$url = 'https://captcha-v1.mudew.com:19951/';
|
||||
$payload = [
|
||||
'type' => 'gt3',
|
||||
@ -54,7 +55,7 @@ class ApiCaptcha
|
||||
$headers = [
|
||||
'Content-Type' => 'application/json',
|
||||
];
|
||||
return Request::postJson(true,'other', $url, $payload, $headers);
|
||||
return Request::postJson(true, 'other', $url, $payload, $headers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -88,7 +88,7 @@ class ApiQrcode
|
||||
public static function goConfrimUrl(string $url): array
|
||||
{
|
||||
// 取出url的主体部分
|
||||
$query = parse_url($url)['query'];
|
||||
$query = parse_url($url)['query'];
|
||||
// 取出url参数部分转为数组
|
||||
parse_str($query, $payload);
|
||||
$headers = [
|
||||
|
||||
@ -33,8 +33,8 @@ class MultiRequest
|
||||
protected array $options = [];
|
||||
protected Closure $successCallback;
|
||||
protected Closure $errorCallback;
|
||||
protected array$urls = [];
|
||||
protected string$method;
|
||||
protected array $urls = [];
|
||||
protected string $method;
|
||||
protected int $concurrency = 10;
|
||||
|
||||
/**
|
||||
|
||||
@ -71,7 +71,7 @@ class Task extends SingleTon
|
||||
*/
|
||||
public static function execTasks(): void
|
||||
{
|
||||
Future\awaitAll(self::$promises);
|
||||
Future\awaitAll(self::$promises);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ class TimeLock extends SingleTon
|
||||
* @param string $end
|
||||
* @return bool
|
||||
*/
|
||||
public static function isWithinTimeRange(string $start, string $end):bool
|
||||
public static function isWithinTimeRange(string $start, string $end): bool
|
||||
{
|
||||
// date_default_timezone_set('Asia/Shanghai');
|
||||
$startTime = strtotime(date($start));
|
||||
|
||||
@ -75,7 +75,7 @@ class QrSpec
|
||||
return self::$capacity[$version][Constants::QRCAP_WORDS] - self::$capacity[$version][Constants::QRCAP_EC][$level];
|
||||
}
|
||||
|
||||
public static function getECCLength(int $version,int $level)
|
||||
public static function getECCLength(int $version, int $level)
|
||||
{
|
||||
return self::$capacity[$version][Constants::QRCAP_EC][$level];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user