diff --git a/code/.example.env b/code/.example.env index 708559a..52fde1b 100644 --- a/code/.example.env +++ b/code/.example.env @@ -62,3 +62,7 @@ PROXY_CODE = KUAI PROXY_HOST = w740.kdltps.com:15818 PROXY_KEY = t14468368981914 PROXY_SECRET = 03xvfdc0 + +# CRAWLER +NOVEL_START_N_SOURCE_ID = 1 +NOVEL_END_N_SOURCE_ID = 500000 \ No newline at end of file diff --git a/code/app/task/crawler/zw630/Scheduler.php b/code/app/task/crawler/zw630/Scheduler.php index b51775c..dd46ce4 100644 --- a/code/app/task/crawler/zw630/Scheduler.php +++ b/code/app/task/crawler/zw630/Scheduler.php @@ -12,7 +12,7 @@ use app\task\crawler\zw\Scheduler as ZwScheduler; */ class Scheduler extends ZwScheduler { - + protected $intStartNSourceId = 1; protected $intEndNSourceId = 500000; @@ -25,6 +25,10 @@ class Scheduler extends ZwScheduler public function init() { $this->intSlice = 3; + + $this->intStartNSourceId = config('crawler.novel_start_n_source_id'); + + $this->intEndNSourceId = config('crawler.novel_end_n_source_id'); } /** diff --git a/code/app/task/crawler/zw74/Scheduler.php b/code/app/task/crawler/zw74/Scheduler.php index 4697a85..1ea8724 100644 --- a/code/app/task/crawler/zw74/Scheduler.php +++ b/code/app/task/crawler/zw74/Scheduler.php @@ -20,6 +20,10 @@ class Scheduler extends ZwScheduler public function init() { $this->intSlice = 1; + + $this->intStartNSourceId = config('crawler.novel_start_n_source_id'); + + $this->intEndNSourceId = config('crawler.novel_end_n_source_id'); } /** diff --git a/code/config/crawler.php b/code/config/crawler.php new file mode 100644 index 0000000..158953f --- /dev/null +++ b/code/config/crawler.php @@ -0,0 +1,8 @@ + env('NOVEL_START_N_SOURCE_ID', 1), + 'novel_end_n_source_id' => env('NOVEL_END_N_SOURCE_ID', 500000), +];