Commit 4b28a1ac authored by hj's avatar hj

更新提交

parent 02a2d11c
...@@ -86,10 +86,13 @@ class CheMenuService ...@@ -86,10 +86,13 @@ class CheMenuService
if(preg_match('/<li[\s]*?id=[\\\'|\"]pagination_next[\\\'|\"][\s]*?class=[\\\'|\"]disabled[\\\'|\"]>/i', $responseHtml)){ if(preg_match('/<li[\s]*?id=[\\\'|\"]pagination_next[\\\'|\"][\s]*?class=[\\\'|\"]disabled[\\\'|\"]>/i', $responseHtml)){
break; break;
} }
preg_match('/<li[\s]*?id=[\\\'|\"]pagination_next[\\\'|\"]>[\s]*?<a[\S\s]*?href=[\\\'|\"](?<nextHref>[\s\S]+?)[\\\'|\"]/i', $responseHtml, $nextHref); if(preg_match('/<li[\s]*?id=[\\\'|\"]pagination_next[\\\'|\"]>[\s]*?<a[\S\s]*?href=[\\\'|\"](?<nextHref>[\s\S]+?)[\\\'|\"]/i', $responseHtml, $nextHref)){
$pageUrl = str_replace($this->apiService->getDomain(), '', $nextHref['nextHref']); $pageUrl = str_replace($this->apiService->getDomain(), '', $nextHref['nextHref']);
SimpleLogs::writeLog('开始下一页抓取,链接:'.$pageUrl, 'chemenu info', 'info'); SimpleLogs::writeLog('开始下一页抓取,链接:'.$pageUrl, 'chemenu info', 'info');
}else{
SimpleLogs::writeLog('分类页面抓取结束', 'chemenu info', 'info');
}
} }
} }
$randomFloat = 3 + mt_rand(0, 3) + (mt_rand(0, 999) / 1000); $randomFloat = 3 + mt_rand(0, 3) + (mt_rand(0, 999) / 1000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment