From 8b47f3876c8be704dca81e91cd6411e4124aaead Mon Sep 17 00:00:00 2001 From: Lkeme <19500576+lkeme@users.noreply.github.com> Date: Thu, 26 Jun 2025 12:06:24 +0800 Subject: [PATCH] [update] Disable LiveGoldBox --- README.md | 2 +- plugin/LiveGoldBox/LiveGoldBox.php | 12 ++++++++---- profile/example/config/user.ini | 4 ---- profile/example/device/device.yaml | 6 +++--- src/Api/XLive/LotteryInterface/V2/ApiBox.php | 5 +++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ffc1b98..0af3407 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Group: [602815575](https://jq.qq.com/?_wv=1027&k=UaalVexM) | **请不要来问 | VipPrivilege | 0.0.1 | 领取大会员权益 | Lkeme | 1107 | 24(小时) | √ | | BpConsumption | 0.0.1 | 大会员B币券消费 | Lkeme | 1108 | 24(小时) | √ | | LiveReservation | 0.0.1 | 预约直播有奖 | Lkeme | 1109 | 1-3(小时) | √ | -| LiveGoldBox | 0.0.1 | 直播金色宝箱(实物抽奖) | Lkeme | 1110 | 6-10(分钟) | √ | +| LiveGoldBox | 0.0.1 | 直播金色宝箱(实物抽奖) | Lkeme | 1110 | 6-10(分钟) | 暂时废弃 | | AwardRecords | 0.0.1 | 获奖记录 | Lkeme | 1111 | 5(分钟) | √ | | VipPoint | 0.0.1 | 大会员积分 | Lkeme | 1112 | 5(分钟) | √ | | Lottery | 0.0.2 | 抽奖 | MoeHero/Lkeme | 1113 | 10-25(分钟) | √ | diff --git a/plugin/LiveGoldBox/LiveGoldBox.php b/plugin/LiveGoldBox/LiveGoldBox.php index 42b64cf..cf60b26 100644 --- a/plugin/LiveGoldBox/LiveGoldBox.php +++ b/plugin/LiveGoldBox/LiveGoldBox.php @@ -61,11 +61,11 @@ class LiveGoldBox extends BasePlugin public function __construct(Plugin &$plugin) { // 时间锁 - TimeLock::initTimeLock(); + // TimeLock::initTimeLock(); // 缓存 - Cache::initCache(); + // Cache::initCache(); // $this::class - $plugin->register($this, 'execute'); + // $plugin->register($this, 'execute'); } /** @@ -135,7 +135,11 @@ class LiveGoldBox extends BasePlugin { foreach ($lottery_list as $lottery) { extract($lottery); - $response = ApiBox::draw($aid, $num); + + // https://live.bilibili.com/p/html/live-room-treasurebox/index.html?aid={aid} + // room_id 参数缺失,暂时废弃任务 + + $response = ApiBox::draw($aid, $num, 0); if ($response['code']) { Log::warning("金色宝箱: $title($aid->$num) 参与抽奖失败 {$response['code']} -> {$response['message']}~"); } else { diff --git a/profile/example/config/user.ini b/profile/example/config/user.ini index 6eca69c..8297ae4 100644 --- a/profile/example/config/user.ini +++ b/profile/example/config/user.ini @@ -100,10 +100,6 @@ bp2gold = false enable = true vmids = 9617619 -; 直播金色宝箱(实物抽奖) -[live_gold_box] -enable = true - ; 获取记录 [award_records] enable = true diff --git a/profile/example/device/device.yaml b/profile/example/device/device.yaml index 39eab32..ee03bf2 100644 --- a/profile/example/device/device.yaml +++ b/profile/example/device/device.yaml @@ -3,8 +3,8 @@ device_version: 0.0.1 app: bili_a: # Android package: "tv.danmaku.bili" - version: "8.44.0" - build: "8440300" + version: "8.51.0" + build: "8510500" channel: "bili" device: "phone" mobi_app: "android" @@ -15,7 +15,7 @@ app: secret_key: "NTYwYzUyY2NkMjg4ZmVkMDQ1ODU5ZWQxOGJmZmQ5NzM" app_key_n: "NzgzYmJiNzI2NDQ1MWQ4Mg==" secret_key_n: "MjY1MzU4M2M4ODczZGVhMjY4YWI5Mzg2OTE4YjFkNjU=" - statistics: '{"appId":1,"platform":3,"version":"8.44.0","abtest":""}' + statistics: '{"appId":1,"platform":3,"version":"8.51.0","abtest":""}' bili_i: # IOS app_key: "MjdlYjUzZmM5MDU4ZjhjMw==" secret_key: "YzJlZDUzYTc0ZWVlZmUzY2Y5OWZiZDAxZDhjOWMzNzU=" diff --git a/src/Api/XLive/LotteryInterface/V2/ApiBox.php b/src/Api/XLive/LotteryInterface/V2/ApiBox.php index 7a1aae2..f098cac 100644 --- a/src/Api/XLive/LotteryInterface/V2/ApiBox.php +++ b/src/Api/XLive/LotteryInterface/V2/ApiBox.php @@ -25,15 +25,16 @@ class ApiBox * 抽奖 * @param int $aid * @param int $round + * @param int $room_id * @return array */ - public static function draw(int $aid, int $round): array + public static function draw(int $aid, int $round, int $room_id): array { - // $url = 'https://api.live.bilibili.com/lottery/v1/Box/draw'; $url = 'https://api.live.bilibili.com/xlive/lottery-interface/v2/Box/draw'; $payload = [ 'aid' => $aid, 'number' => $round, + 'room_id' => $room_id, ]; return Request::getJson(true, 'pc', $url, $payload); }