@cloud411716/fancy-webnovel 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -120,7 +120,7 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
120
120
  'node',
121
121
  [join(SCAN_SCRIPTS_DIR, 'run-scan.js'),
122
122
  '--project-root', projectRoot, '--platform', platform, '--length', length],
123
- { timeout: 120000, stop }
123
+ { timeout: 900000, stop }
124
124
  );
125
125
  return r;
126
126
  };
@@ -179,7 +179,7 @@ function spawnScraper(platform, length, outDir) {
179
179
 
180
180
  process.stderr.write(`\n→ 启动采集脚本...`);
181
181
  const p = spawn('node', [scraperScript, ...fullArgs], {
182
- timeout: 300000,
182
+ timeout: 900000,
183
183
  stdio: ['ignore', 'pipe', 'inherit'],
184
184
  });
185
185
  let out = '';
@@ -271,7 +271,7 @@ async function scrapeChannel(ch, type) {
271
271
  const initCatId = ch === "1" ? "1141" : "1139"; // 男频:西方奇幻 / 女频:古风世情
272
272
  const initUrl = `https://fanqienovel.com/rank/${ch}_${type}_${initCatId}`;
273
273
 
274
- const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage"] });
274
+ const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage", "--start-maximized"] });
275
275
  const context = await browser.newContext();
276
276
  const page = await context.newPage();
277
277
 
@@ -112,7 +112,7 @@ async function scrapeRank(rankTypeId, channelId) {
112
112
  console.log(`\n→ 采集 晋江${rt.label}(${chLabel})...`);
113
113
  console.log(` URL: ${url}`);
114
114
 
115
- const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage"] });
115
+ const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage", "--start-maximized"] });
116
116
  const context = await browser.newContext();
117
117
  const page = await context.newPage();
118
118
 
@@ -108,7 +108,7 @@ async function scrapeRank(channelId, rankTypeId, periodId) {
108
108
  const url = rankUrl(channelId, rankTypeId, periodId);
109
109
  console.log(`\n→ 采集 七猫${ch.label}${rt.label}${period ? period.label : ""}...`);
110
110
 
111
- const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage"] });
111
+ const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage", "--start-maximized"] });
112
112
  const context = await browser.newContext();
113
113
  const page = await context.newPage();
114
114
 
@@ -61,7 +61,7 @@ function sleep(ms) {
61
61
  async function scrapeBoard(board) {
62
62
  console.log(` [${board.label}] 正在抓取...`);
63
63
 
64
- const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage"] });
64
+ const browser = await chromium.launch({ headless: false, args: ["--no-sandbox", "--disable-dev-shm-usage", "--start-maximized"] });
65
65
  const context = await browser.newContext();
66
66
  const page = await context.newPage();
67
67