Merge branch 'dev' of ssh://git.bgbg.live:18150/root/SEONexus into dev
This commit is contained in:
20
code/app/task/crawler/CrawlerConfig.php
Normal file
20
code/app/task/crawler/CrawlerConfig.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\task\crawler;
|
||||
|
||||
class CrawlerConfig
|
||||
{
|
||||
/**
|
||||
* Undocumented variable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
static $arrExcludeVideoCategory = [
|
||||
'体育',
|
||||
'福利',
|
||||
'伦理',
|
||||
'伦理片',
|
||||
];
|
||||
}
|
||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace app\task\crawler\fengchao;
|
||||
|
||||
use app\model\ChapterModel;
|
||||
use app\task\crawler\CrawlerConfig;
|
||||
use app\task\crawler\fengchao\page\Site;
|
||||
use microserver\QueueManage;
|
||||
use storage\StorageCore;
|
||||
@@ -66,12 +67,6 @@ class Scheduler
|
||||
return $this->Site;
|
||||
}
|
||||
|
||||
public $arrExcludeCategory = [
|
||||
'体育',
|
||||
'福利',
|
||||
'伦理',
|
||||
'伦理片',
|
||||
];
|
||||
|
||||
/**
|
||||
* create a site-wide craw task
|
||||
@@ -112,7 +107,7 @@ class Scheduler
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($arrCategory['v_category_name'], $this->arrExcludeCategory)) {
|
||||
if (in_array($arrCategory['v_category_name'], CrawlerConfig::$arrExcludeVideoCategory)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace app\task\crawler\wuxian;
|
||||
|
||||
use app\model\ChapterModel;
|
||||
use app\task\crawler\CrawlerConfig;
|
||||
use app\task\crawler\wuxian\page\Site;
|
||||
use microserver\QueueManage;
|
||||
use storage\StorageCore;
|
||||
@@ -66,13 +67,6 @@ class Scheduler
|
||||
return $this->Site;
|
||||
}
|
||||
|
||||
public $arrExcludeCategory = [
|
||||
'体育',
|
||||
'福利',
|
||||
'伦理',
|
||||
'伦理片',
|
||||
];
|
||||
|
||||
/**
|
||||
* create a site-wide craw task
|
||||
*
|
||||
@@ -109,7 +103,7 @@ class Scheduler
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($arrCategory['v_category_name'], $this->arrExcludeCategory)) {
|
||||
if (in_array($arrCategory['v_category_name'], CrawlerConfig::$arrExcludeVideoCategory)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace app\task\crawler\youzhi;
|
||||
|
||||
use app\model\ChapterModel;
|
||||
use app\task\crawler\CrawlerConfig;
|
||||
use app\task\crawler\youzhi\page\Site;
|
||||
use microserver\QueueManage;
|
||||
use storage\StorageCore;
|
||||
@@ -66,12 +67,7 @@ class Scheduler
|
||||
return $this->Site;
|
||||
}
|
||||
|
||||
public $arrExcludeCategory = [
|
||||
'体育',
|
||||
'福利',
|
||||
'伦理',
|
||||
'伦理片',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* create a site-wide craw task
|
||||
@@ -110,7 +106,7 @@ class Scheduler
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($arrCategory['v_category_name'], $this->arrExcludeCategory)) {
|
||||
if (in_array($arrCategory['v_category_name'], CrawlerConfig::$arrExcludeVideoCategory)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user