作者 赵彬吉

update

... ... @@ -103,7 +103,7 @@ class QuanqiusouApi
Cache::put($key, $res, 2 * 3600);
}
} catch (\Exception | GuzzleException $e) {
errorLog('获取谷歌排名数据失败', $api_no, $e);
errorLog('获取谷歌排名数据失败', [$api_no], $e);
return false;
}
}
... ...
... ... @@ -371,7 +371,7 @@ class RankDataLogic extends BaseLogic
if (!$model || $model->updated_date != date('Y-m-d') || $force) {
$res = $api->getGoogleRank($api_no, 0, 7, $force);
if (!$res) {
throw new \Exception('接口数据获取失败');
throw new \Exception("接口数据获取失败,api_no:{$api_no}");
}
//收录数
$indexed_pages_num = $site_res[$api_no] ?? 0;
... ... @@ -384,7 +384,7 @@ class RankDataLogic extends BaseLogic
if (!$model || $model->updated_date != date('Y-m-d') || $force) {
$res = $api->getGoogleRank($api_no, 1, 7, $force);
if (!$res) {
throw new \Exception('接口数据获取失败');
throw new \Exception("接口数据获取失败,api_no:{$api_no},lang");
}
$data = [];
//不同的小语种取出来
... ...