mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 01:20:08 +08:00
[fix]获取抽奖帖失败处理
This commit is contained in:
parent
1301d81258
commit
c0e6dd9b12
@ -48,12 +48,10 @@ class Dynamic
|
||||
Log::info("获取关键字 $t_name - $t_id");
|
||||
$url = 'https://api.vc.bilibili.com/topic_svr/v1/topic_svr/topic_new?topic_id=' . $t_id;
|
||||
$data = Curl::request('get', $url);
|
||||
$data = json_decode($data, true);
|
||||
if (!isset($data['data'])) {
|
||||
Log::warning("获取抽奖贴失败: {$data['message']}");
|
||||
continue;
|
||||
}
|
||||
// 失败跳过
|
||||
if (is_null($data)) continue;
|
||||
|
||||
$data = json_decode($data, true);
|
||||
// new
|
||||
foreach ($data['data']['cards'] as $article) {
|
||||
$article_id = $article['desc']['dynamic_id'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user