Commit 02a2d11c authored by hj's avatar hj

更新提交

parent f8cd1a77
...@@ -57,6 +57,12 @@ class CheMenuService ...@@ -57,6 +57,12 @@ class CheMenuService
if($responseHtml){ if($responseHtml){
if(preg_match('/<span[\s]*?class=[\\\'|\"]caption-subject font-blue-sharp bold[\\\'|\"]>Sorry ! You visit too frequently, please complete validation[\s\S]*?<\/span><\/h2>/i', $responseHtml)){ if(preg_match('/<span[\s]*?class=[\\\'|\"]caption-subject font-blue-sharp bold[\\\'|\"]>Sorry ! You visit too frequently, please complete validation[\s\S]*?<\/span><\/h2>/i', $responseHtml)){
SimpleLogs::writeLog('遇到反爬系统', 'chemenu info', 'info'); SimpleLogs::writeLog('遇到反爬系统', 'chemenu info', 'info');
$jobContent = [
'params' => ['url' => $pageUrl],
'consumer' => __CLASS__,
'method' => 'categoryPage'
];
$this->apiService->pushQueue($jobContent,'chemenu_category_page');
return true; return true;
} }
SimpleLogs::writeLog('开始分析分类页面数据', 'chemenu info', 'info'); SimpleLogs::writeLog('开始分析分类页面数据', 'chemenu info', 'info');
...@@ -107,6 +113,12 @@ class CheMenuService ...@@ -107,6 +113,12 @@ class CheMenuService
if($responseHtml){ if($responseHtml){
if(preg_match('/<span[\s]*?class=[\\\'|\"]caption-subject font-blue-sharp bold[\\\'|\"]>Sorry ! You visit too frequently, please complete validation[\s\S]*?<\/span><\/h2>/i', $responseHtml)){ if(preg_match('/<span[\s]*?class=[\\\'|\"]caption-subject font-blue-sharp bold[\\\'|\"]>Sorry ! You visit too frequently, please complete validation[\s\S]*?<\/span><\/h2>/i', $responseHtml)){
SimpleLogs::writeLog('遇到反爬系统', 'chemenu info', 'info'); SimpleLogs::writeLog('遇到反爬系统', 'chemenu info', 'info');
$productJobContent = [
'params' => ['url' => $pageUrl],
'consumer' => __CLASS__,
'method' => 'productPage'
];
$this->apiService->pushQueue($productJobContent,'chemenu_product_page');
return true; return true;
} }
$productPageContent = []; $productPageContent = [];
......
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