作者 刘锟

采集

... ... @@ -247,7 +247,7 @@ class HtmlCollect extends Command
]);
$html = str_replace($vs['url'], getImageUrl($new_source), $html);
if (substr($new_source, -1, 3) == 'css') {
if (substr($new_source, -3, 3) == 'css') {
// 下载css文件中的资源
$css_html = file_get_contents($vs['url_complete']);
preg_match_all("/url\(['\"](\s*[^>]+?)['\"]\)/i", $css_html, $result_css_source);
... ... @@ -261,6 +261,7 @@ class HtmlCollect extends Command
//不是相对路径,不下载
continue;
}
$vcs = $vcs['path'];
$source_info = CollectSource::where('project_id', $project_id)->where('origin', $vcs)->first();
if ($source_info) {
... ...