Merge pull request #140 from Dishesdog/master

[fix] fix bug
This commit is contained in:
lkeme 2021-11-16 17:40:26 +08:00 committed by GitHub
commit 1baae21060
2 changed files with 3 additions and 2 deletions

View File

@ -48,9 +48,9 @@ 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);
// 失败跳过
if (is_null($data)) continue;
$data = json_decode($data, true);
// new
foreach ($data['data']['cards'] as $article) {
$article_id = $article['desc']['dynamic_id'];
@ -302,4 +302,4 @@ class Dynamic
}
return false;
}
}
}

View File

@ -130,5 +130,6 @@ class LiveReservation
'text' => $data['lottery_prize_info']['text'], // "预约有奖:小电视年糕抱枕、哔哩哔哩小电视樱花毛绒抱枕大号、哔哩哔哩小夜灯"
];
}
return false;
}
}