作者 lyh

gx

@@ -289,7 +289,7 @@ class AiVideoAutoPublish extends Command @@ -289,7 +289,7 @@ class AiVideoAutoPublish extends Command
289 * @method :post 289 * @method :post
290 * @time :2025/8/1 16:25 290 * @time :2025/8/1 16:25
291 */ 291 */
292 - public function getAiVideoParam($project_id = 4914) 292 + public function getAiVideoParam($project_id = 3751)
293 { 293 {
294 //获取当前网站域名 294 //获取当前网站域名
295 $domainModel = new DomainInfo(); 295 $domainModel = new DomainInfo();
@@ -319,14 +319,17 @@ class AiVideoAutoPublish extends Command @@ -319,14 +319,17 @@ class AiVideoAutoPublish extends Command
319 $img = $dom->find('.layout .global_section img'); 319 $img = $dom->find('.layout .global_section img');
320 $images = []; 320 $images = [];
321 foreach ($img as $item) { 321 foreach ($img as $item) {
322 - if (empty($item->src) || empty($item->alt)) 322 + if (empty($item->src) || empty($item->alt)){
323 continue; 323 continue;
324 - array_push($images, ['src' => $item->src, 'alt' => $item->alt]); 324 + }
  325 + array_push($images, ['url' => $item->src, 'alt' => $item->alt]);
325 } 326 }
326 if (empty($title) || empty($content) || empty($images)) { 327 if (empty($title) || empty($content) || empty($images)) {
327 $num++; 328 $num++;
328 goto AGAIN; 329 goto AGAIN;
329 } 330 }
  331 + dd(['title'=>$title,'remark'=>$content,'images'=>$images]);
  332 + return ['title'=>$title,'remark'=>$content,'images'=>$images];
330 } catch (\Exception $e) { 333 } catch (\Exception $e) {
331 echo 'project_id: ' . $project_id . ', domain: ' . $domain . ', error: ' . $e->getMessage() . PHP_EOL; 334 echo 'project_id: ' . $project_id . ', domain: ' . $domain . ', error: ' . $e->getMessage() . PHP_EOL;
332 } 335 }