mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-18 17:00:06 +08:00
[fix] BaseRaffle
This commit is contained in:
parent
9f0353244f
commit
bf626504d5
16
CHANGELOG.md
16
CHANGELOG.md
@ -1,6 +1,22 @@
|
||||
# Release Notes
|
||||
# 本项目Log
|
||||
|
||||
## v0.4.0.200505 alpha (2020-05-05)
|
||||
|
||||
### Added
|
||||
-
|
||||
|
||||
### Changed
|
||||
- 关闭已结束的LPL赛事任务
|
||||
-
|
||||
|
||||
### Fixed
|
||||
- 修复日志回调空格解析异常
|
||||
- 修复节奏风暴回显过滤错误
|
||||
- 修复活动抽奖重复请求问题
|
||||
- 修复主站任务获取AID异常
|
||||
-
|
||||
|
||||
## v0.4.0.200428 alpha (2020-04-28)
|
||||
|
||||
### Added
|
||||
|
||||
52
DOC.md
52
DOC.md
@ -2,7 +2,7 @@
|
||||
<p align="center"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/version-0.4.0.200426 alpha-green.svg?longCache=true&style=for-the-badge">
|
||||
<img src="https://img.shields.io/badge/version-0.4.0.200505 alpha-green.svg?longCache=true&style=for-the-badge">
|
||||
<img src="https://img.shields.io/badge/license-mit-blue.svg?longCache=true&style=for-the-badge">
|
||||
</p>
|
||||
|
||||
@ -15,31 +15,31 @@ B 站直播实用脚本
|
||||
|
||||
|plugin |version |description |
|
||||
|--------------------|--------------------|--------------------|
|
||||
|Login |20.04.26 |账号登录 |
|
||||
|Schedule |20.04.26 |休眠控制 |
|
||||
|MasterSite |20.04.26 |主站助手 |
|
||||
|Daily |20.04.26 |每日礼包 |
|
||||
|Heart |20.04.26 |双端心跳 |
|
||||
|Task |20.04.26 |每日任务 |
|
||||
|Silver |20.04.26 |银瓜子宝箱 |
|
||||
|Barrage |20.04.26 |活跃弹幕 |
|
||||
|Silver2Coin |20.04.26 |银瓜子换硬币 |
|
||||
|GiftSend |20.04.26 |礼物赠送 |
|
||||
|Judge |20.04.26 |风纪 |
|
||||
|GroupSignIn |20.04.26 |友爱社签到 |
|
||||
|ManGa |20.04.26 |漫画签到分享 |
|
||||
|Match |20.04.26 |赛事签到分享 |
|
||||
|GiftHeart |20.04.26 |心跳礼物 |
|
||||
|MaterialObject |20.04.26 |实物抽奖 |
|
||||
|AloneTcpClient |20.04.26 |独立监控 |
|
||||
|ZoneTcpClient |20.04.26 |分区监控 |
|
||||
|StormRaffle |20.04.26 |节奏风暴 |
|
||||
|GiftRaffle |20.04.26 |活动礼物 |
|
||||
|PkRaffle |20.04.26 |大乱斗 |
|
||||
|GuardRaffle |20.04.26 |舰长总督 |
|
||||
|AnchorRaffle |20.04.26 |天选时刻 |
|
||||
|AwardRecord |20.04.26 |获奖通知 |
|
||||
|Statistics |20.04.26 |数据统计 |
|
||||
|Login |20.05.05 |账号登录 |
|
||||
|Schedule |20.05.05 |休眠控制 |
|
||||
|MasterSite |20.05.05 |主站助手 |
|
||||
|Daily |20.05.05 |每日礼包 |
|
||||
|Heart |20.05.05 |双端心跳 |
|
||||
|Task |20.05.05 |每日任务 |
|
||||
|Silver |20.05.05 |银瓜子宝箱 |
|
||||
|Barrage |20.05.05 |活跃弹幕 |
|
||||
|Silver2Coin |20.05.05 |银瓜子换硬币 |
|
||||
|GiftSend |20.05.05 |礼物赠送 |
|
||||
|Judge |20.05.05 |风纪 |
|
||||
|GroupSignIn |20.05.05 |友爱社签到 |
|
||||
|ManGa |20.05.05 |漫画签到分享 |
|
||||
|Match |20.05.05 |赛事签到分享 |
|
||||
|GiftHeart |20.05.05 |心跳礼物 |
|
||||
|MaterialObject |20.05.05 |实物抽奖 |
|
||||
|AloneTcpClient |20.05.05 |独立监控 |
|
||||
|ZoneTcpClient |20.05.05 |分区监控 |
|
||||
|StormRaffle |20.05.05 |节奏风暴 |
|
||||
|GiftRaffle |20.05.05 |活动礼物 |
|
||||
|PkRaffle |20.05.05 |大乱斗 |
|
||||
|GuardRaffle |20.05.05 |舰长总督 |
|
||||
|AnchorRaffle |20.05.05 |天选时刻 |
|
||||
|AwardRecord |20.05.05 |获奖通知 |
|
||||
|Statistics |20.05.05 |数据统计 |
|
||||
|
||||
## 打赏赞助
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ Group: [55308141](https://jq.qq.com/?_wv=1027&k=5AIDaJg) | **仅用于BUG提交
|
||||
|
||||
## 公告
|
||||
|
||||
> Currently for Personal Edition **0.4.0.200426 alpha**
|
||||
> Currently for Personal Edition **0.4.0.200505 alpha**
|
||||
|
||||
```notice
|
||||
---- 免费的东西总是得不到人的珍惜。
|
||||
|
||||
@ -13,6 +13,7 @@ namespace BiliHelper\Core;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Bramus\Monolog\Formatter\ColoredLineFormatter;
|
||||
use function GuzzleHttp\Psr7\str;
|
||||
|
||||
class Log
|
||||
{
|
||||
@ -104,7 +105,7 @@ class Log
|
||||
$url = str_replace('{account}', self::prefix(), getenv('APP_CALLBACK'));
|
||||
$url = str_replace('{level}', $level, $url);
|
||||
$url = str_replace('{message}', urlencode($message), $url);
|
||||
Curl::request('get', $url);
|
||||
Curl::request('get', str_replace(' ', '%20', $url));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -155,8 +155,8 @@ abstract class BaseRaffle
|
||||
if (in_array($lid, static::$all_list)) {
|
||||
return true;
|
||||
}
|
||||
if (count(static::$all_list) > 1000) {
|
||||
static::$all_list = [];
|
||||
if (count(static::$all_list) > 4000) {
|
||||
static::$all_list = array_values(array_splice(static::$all_list, 2000, 2000));
|
||||
}
|
||||
if ($filter) {
|
||||
array_push(static::$all_list, $lid);
|
||||
|
||||
@ -183,7 +183,7 @@ class MasterSite
|
||||
$de_raw = json_decode($raw, true);
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
while (true) {
|
||||
$rand_num = mt_rand(1, 100);
|
||||
$rand_num = mt_rand(1, 99);
|
||||
if (in_array($rand_num, $rand_nums)) {
|
||||
continue;
|
||||
} else {
|
||||
|
||||
@ -21,13 +21,13 @@ class Match
|
||||
private static $tasks = ['sign', 'share'];
|
||||
private static $check_status = false;
|
||||
private static $room_infos = [
|
||||
'LPL' => [
|
||||
'type_id' => 25,
|
||||
'room_id' => 7734200,
|
||||
'short_room_id' => 6,
|
||||
'lottery_id' => 46,
|
||||
'status' => true
|
||||
],
|
||||
// 'LPL' => [
|
||||
// 'type_id' => 25,
|
||||
// 'room_id' => 7734200,
|
||||
// 'short_room_id' => 6,
|
||||
// 'lottery_id' => 46,
|
||||
// 'status' => true
|
||||
// ],
|
||||
'OW' => [
|
||||
'type_id' => 26,
|
||||
'room_id' => 14073662,
|
||||
@ -49,6 +49,7 @@ class Match
|
||||
if (self::getLock() > time() || getenv('USE_MATCH') == 'false') {
|
||||
return;
|
||||
}
|
||||
// TODO 赛事访问拒绝
|
||||
self::initTask();
|
||||
self::filterTask();
|
||||
self::workTask();
|
||||
|
||||
@ -122,6 +122,10 @@ class StormRaffle extends BaseRaffle
|
||||
Log::notice(self::formatInfo($raffle['raffle_id'], $num, $de_raw['data']['mobile_content']));
|
||||
break;
|
||||
}
|
||||
if (!isset($de_raw['msg'])) {
|
||||
Log::notice(self::formatInfo($raffle['raffle_id'], $num, $de_raw));
|
||||
break;
|
||||
}
|
||||
if ($de_raw['msg'] == '节奏风暴不存在' || $de_raw['msg'] == '节奏风暴抽奖过期' || $de_raw['msg'] == '没抢到') {
|
||||
Log::notice(self::formatInfo($raffle['raffle_id'], $num, '节奏风暴已经结束'));
|
||||
break;
|
||||
|
||||
@ -505,6 +505,7 @@ class ZoneTcpClient
|
||||
if ($ret)
|
||||
break;
|
||||
}
|
||||
// TODO unable to read from socket[104]: Connection reset by peer
|
||||
$ret = socket_recv($socket, $buffer, $length, 0);
|
||||
if ($ret < 1) {
|
||||
Log::warning("Socket error: [{$ret}] [{$length}]" . PHP_EOL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user