作者 赵彬吉
... ... @@ -17,7 +17,6 @@ use App\Models\Project\Project;
use Illuminate\Console\Command;
use App\Models\Domain\DomainInfo as DomainInfoModel;
use Illuminate\Support\Facades\Log;
use Symfony\Component\Process\Process;
class DomainInfo extends Command
{
... ...
... ... @@ -323,9 +323,12 @@ class VideoTask extends Command
$logo = $bg = '';
try {
$dom = file_get_html('https://'.$domainInfo['domain'].'/');
$logoDom = $dom->find('.logo', 0)->find("img",0);
if($logoDom != null){
$logo = $logoDom->src;
$logoDom = $dom->find('.logo', 0);
if ($logoDom) {
$logoDomImg = $logoDom->find("img",0);
if($logoDomImg != null){
$logo = $logoDomImg->src;
}
}
$elements = $dom->find('.section-banner-wrap-block');
if (count($elements) >= 2) {
... ...
... ... @@ -119,7 +119,7 @@ if (!function_exists('http_get')) {
$access_txt = curl_exec($ch1);
if (curl_errno($ch1)) {
$error_message = curl_error($ch1);
errorLog('请求失败', $url, $error_message);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($error_message, true) . PHP_EOL, FILE_APPEND);
}
curl_close($ch1);
return json_decode($access_txt, true);
... ...