Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
3 个修改的文件
包含
7 行增加
和
5 行删除
| @@ -17,7 +17,6 @@ use App\Models\Project\Project; | @@ -17,7 +17,6 @@ use App\Models\Project\Project; | ||
| 17 | use Illuminate\Console\Command; | 17 | use Illuminate\Console\Command; |
| 18 | use App\Models\Domain\DomainInfo as DomainInfoModel; | 18 | use App\Models\Domain\DomainInfo as DomainInfoModel; |
| 19 | use Illuminate\Support\Facades\Log; | 19 | use Illuminate\Support\Facades\Log; |
| 20 | -use Symfony\Component\Process\Process; | ||
| 21 | 20 | ||
| 22 | class DomainInfo extends Command | 21 | class DomainInfo extends Command |
| 23 | { | 22 | { |
| @@ -323,9 +323,12 @@ class VideoTask extends Command | @@ -323,9 +323,12 @@ class VideoTask extends Command | ||
| 323 | $logo = $bg = ''; | 323 | $logo = $bg = ''; |
| 324 | try { | 324 | try { |
| 325 | $dom = file_get_html('https://'.$domainInfo['domain'].'/'); | 325 | $dom = file_get_html('https://'.$domainInfo['domain'].'/'); |
| 326 | - $logoDom = $dom->find('.logo', 0)->find("img",0); | ||
| 327 | - if($logoDom != null){ | ||
| 328 | - $logo = $logoDom->src; | 326 | + $logoDom = $dom->find('.logo', 0); |
| 327 | + if ($logoDom) { | ||
| 328 | + $logoDomImg = $logoDom->find("img",0); | ||
| 329 | + if($logoDomImg != null){ | ||
| 330 | + $logo = $logoDomImg->src; | ||
| 331 | + } | ||
| 329 | } | 332 | } |
| 330 | $elements = $dom->find('.section-banner-wrap-block'); | 333 | $elements = $dom->find('.section-banner-wrap-block'); |
| 331 | if (count($elements) >= 2) { | 334 | if (count($elements) >= 2) { |
| @@ -119,7 +119,7 @@ if (!function_exists('http_get')) { | @@ -119,7 +119,7 @@ if (!function_exists('http_get')) { | ||
| 119 | $access_txt = curl_exec($ch1); | 119 | $access_txt = curl_exec($ch1); |
| 120 | if (curl_errno($ch1)) { | 120 | if (curl_errno($ch1)) { |
| 121 | $error_message = curl_error($ch1); | 121 | $error_message = curl_error($ch1); |
| 122 | - errorLog('请求失败', $url, $error_message); | 122 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($error_message, true) . PHP_EOL, FILE_APPEND); |
| 123 | } | 123 | } |
| 124 | curl_close($ch1); | 124 | curl_close($ch1); |
| 125 | return json_decode($access_txt, true); | 125 | return json_decode($access_txt, true); |
-
请 注册 或 登录 后发表评论