Updated scraper.ts

This commit is contained in:
qwsdcvghyu89
2026-06-17 07:28:48 +10:00
parent 363d894c79
commit fdd1d1131d
2 changed files with 12 additions and 7 deletions
+11 -4
View File
@@ -1,15 +1,22 @@
services: services:
quick-access: quick-access:
image: quick-access-hono image: aeqw89/quick-access-hono:latest
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "8080:8080" - 127.0.0.1:5681:8080
depends_on: depends_on:
- selenium-firefox - selenium-firefox
environment:
- HOME=/root/
volumes:
- data:/root/downloads
selenium-firefox: selenium-firefox:
image: selenium/standalone-firefox:latest image: selenium/standalone-firefox:latest
ports: expose:
- "4444:4444" - 127.0.0.1:4444:4444
volumes:
data:
+1 -3
View File
@@ -3,7 +3,6 @@ import { Options as FirefoxOptions } from 'selenium-webdriver/firefox.js';
import * as cheerio from 'cheerio'; import * as cheerio from 'cheerio';
import pLimit from 'p-limit'; import pLimit from 'p-limit';
import pRetry from 'p-retry'; import pRetry from 'p-retry';
import { readFileSync } from 'fs';
import path from 'path'; import path from 'path';
import type { AppConfig, NovelDefinition } from '../config/types.ts'; import type { AppConfig, NovelDefinition } from '../config/types.ts';
import type { Cache } from './cache.ts'; import type { Cache } from './cache.ts';
@@ -17,8 +16,7 @@ function buildDefaultDriverFactory(def: NovelDefinition, appConfig: AppConfig):
for (const addonName of (def.stealth?.addons ?? [])) { for (const addonName of (def.stealth?.addons ?? [])) {
const addonPath = path.resolve(appConfig.addons.directory, addonName); const addonPath = path.resolve(appConfig.addons.directory, addonName);
const addonData = readFileSync(addonPath); options.addExtensions(addonPath);
options.addExtensions(addonData);
} }
return new Builder() return new Builder()