@cloud411716/fancy-webnovel 0.1.45 → 0.1.46

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.1.45",
3
+ "version": "0.1.46",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -173,8 +173,8 @@ function renderQidianMarkdown(rankLabel, url, books) {
173
173
  // ---------------------------------------------------------------------------
174
174
 
175
175
  function spawnScraper(platform, length, outDir) {
176
- return new Promise((resolve) => {
177
- const { spawn } = require('child_process');
176
+ return new Promise(async (resolve) => {
177
+ const { spawn } = await import('child_process');
178
178
  const args = scraperArgs(platform, length, outDir);
179
179
  // 先尝试 9222 端口(Chrome CDP),没有 Chrome 则尝试 9223
180
180
  const ports = ['9222', '9223'];