作者 赵彬吉

update

@@ -38,7 +38,7 @@ abstract class BaseCommands extends Command @@ -38,7 +38,7 @@ abstract class BaseCommands extends Command
38 if($error){ 38 if($error){
39 echo 'error'; 39 echo 'error';
40 } 40 }
41 - $error && sleep(60); 41 + $error && sleep(10);
42 }while($error); 42 }while($error);
43 } 43 }
44 44
@@ -35,7 +35,7 @@ class SemrushApi @@ -35,7 +35,7 @@ class SemrushApi
35 ]; 35 ];
36 try { 36 try {
37 $res = HttpUtils::get($url, $params); 37 $res = HttpUtils::get($url, $params);
38 - return $this->data($res)[0]; 38 + return $this->data($res)[0] ?? [];
39 }catch (\Exception|GuzzleException $e){ 39 }catch (\Exception|GuzzleException $e){
40 errorLog('获取站点外链数据失败', $params, $e); 40 errorLog('获取站点外链数据失败', $params, $e);
41 return false; 41 return false;