[fix] StormRaffle

This commit is contained in:
0x012FA733 2022-07-29 23:49:54 +08:00
parent b1b8b11378
commit b961283968
2 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@
## 💬交流反馈 ## 💬交流反馈
Group: [163955623](https://jq.qq.com/?_wv=1027&k=1QMFTUEO) | **请不要来问如何使用, 文档齐全, 仅用于BUG提交反馈** Group: [602815575](https://jq.qq.com/?_wv=1027&k=UaalVexM) | **请不要来问如何使用, 文档齐全, 仅用于BUG提交反馈**
## 🧑‍🏭功能组件 ## 🧑‍🏭功能组件
@ -97,7 +97,6 @@ Group: [163955623](https://jq.qq.com/?_wv=1027&k=1QMFTUEO) | **请不要来问
| PkRaffle | true | 22.05.17 | 待整理 | 直播大乱斗抽奖 | | PkRaffle | true | 22.05.17 | 待整理 | 直播大乱斗抽奖 |
| GuardRaffle | true | 22.05.17 | 待整理 | 直播大航海抽奖 | | GuardRaffle | true | 22.05.17 | 待整理 | 直播大航海抽奖 |
| AnchorRaffle | true | 22.05.17 | 待整理 | 直播天选时刻抽奖 | | AnchorRaffle | true | 22.05.17 | 待整理 | 直播天选时刻抽奖 |
| GiftRaffle | true | 22.05.17 | 待整理 | 直播礼物抽奖 |
| AwardRecord | true | 22.05.17 | 待整理 | 最新的中奖纪录通知 | | AwardRecord | true | 22.05.17 | 待整理 | 最新的中奖纪录通知 |
| Forward | true | 22.05.17 | 待整理 | 主站动态抽奖转发 | | Forward | true | 22.05.17 | 待整理 | 主站动态抽奖转发 |
| CapsuleLottery | true | 22.05.17 | 待整理 | 直播扭蛋活动抽奖 | | CapsuleLottery | true | 22.05.17 | 待整理 | 直播扭蛋活动抽奖 |

View File

@ -86,7 +86,8 @@ class StormRaffle extends BaseRaffle
*/ */
protected static function createLottery(array $raffles): array protected static function createLottery(array $raffles): array
{ {
$url = 'https://api.live.bilibili.com/lottery/v1/Storm/join'; // $url = 'https://api.live.bilibili.com/lottery/v1/Storm/join';
$url = 'https://api.live.bilibili.com/xlive/lottery-interface/v1/storm/Join';
foreach ($raffles as $raffle) { foreach ($raffles as $raffle) {
self::$attempt = empty($attempt = getConf('attempt', 'live_storm')) ? [5, 10] : explode(',', $attempt); self::$attempt = empty($attempt = getConf('attempt', 'live_storm')) ? [5, 10] : explode(',', $attempt);
$num = mt_rand((int)self::$attempt[0], (int)self::$attempt[1]); $num = mt_rand((int)self::$attempt[0], (int)self::$attempt[1]);
@ -101,7 +102,7 @@ class StormRaffle extends BaseRaffle
"visit_id" => "" "visit_id" => ""
]; ];
for ($i = 1; $i < $num; $i++) { for ($i = 1; $i < $num; $i++) {
$raw = Curl::post('app', $url, Sign::common($payload)); $raw = Curl::post('pc', $url, $payload);
if (str_contains((string)$raw, 'html')) { if (str_contains((string)$raw, 'html')) {
Log::notice(self::formatInfo($raffle['raffle_id'], $num, '触发哔哩哔哩安全风控策略(412)')); Log::notice(self::formatInfo($raffle['raffle_id'], $num, '触发哔哩哔哩安全风控策略(412)'));
break; break;