feature config start page and end page with novel by craler

This commit is contained in:
Default
2025-04-29 20:17:48 +08:00
parent ec7a2dd342
commit badbb7cf13
4 changed files with 21 additions and 1 deletions

View File

@@ -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

View File

@@ -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');
}
/**

View File

@@ -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');
}
/**

8
code/config/crawler.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Crawler 设置
// +----------------------------------------------------------------------
return [
'novel_start_n_source_id' => env('NOVEL_START_N_SOURCE_ID', 1),
'novel_end_n_source_id' => env('NOVEL_END_N_SOURCE_ID', 500000),
];