模糊抓取车型

This commit is contained in:
2025-10-28 16:19:37 +08:00
parent 6184689e81
commit 77dad7daed
4 changed files with 129 additions and 58 deletions
+14
View File
@@ -73,4 +73,18 @@ class CrawlService
});
return $href;
}
/**
* 关键词搜索的更多页面,通过面包屑抓取品牌与系列
* @param $series
* @return mixed|string
*/
public function crawlBrandSeries($series)
{
$url = "https://www.dongchedi.com/auto/series/" . $series . "?anchorId=carModels";
$ql = QueryList::get($url);
$result = $ql->find('div.breadcrumb_wrap__2GLeU span')->texts()->all();
return ['brand' => $result[2], 'series' => $result[3]];
}
}