From fdd1d1131dfd8f9cd592587f6514d11747a7da25 Mon Sep 17 00:00:00 2001 From: qwsdcvghyu89 <61093706+qwsdcvghyu89@users.noreply.github.com> Date: Wed, 17 Jun 2026 07:28:48 +1000 Subject: [PATCH] Updated scraper.ts --- docker-compose.yml | 15 +++++++++++---- src/services/scraper.ts | 4 +--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 106b59c..e47480d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,22 @@ services: quick-access: - image: quick-access-hono + image: aeqw89/quick-access-hono:latest build: context: . dockerfile: Dockerfile ports: - - "8080:8080" + - 127.0.0.1:5681:8080 depends_on: - selenium-firefox + environment: + - HOME=/root/ + volumes: + - data:/root/downloads selenium-firefox: image: selenium/standalone-firefox:latest - ports: - - "4444:4444" + expose: + - 127.0.0.1:4444:4444 + +volumes: + data: diff --git a/src/services/scraper.ts b/src/services/scraper.ts index 0829e30..ddfc918 100644 --- a/src/services/scraper.ts +++ b/src/services/scraper.ts @@ -3,7 +3,6 @@ import { Options as FirefoxOptions } from 'selenium-webdriver/firefox.js'; import * as cheerio from 'cheerio'; import pLimit from 'p-limit'; import pRetry from 'p-retry'; -import { readFileSync } from 'fs'; import path from 'path'; import type { AppConfig, NovelDefinition } from '../config/types.ts'; import type { Cache } from './cache.ts'; @@ -17,8 +16,7 @@ function buildDefaultDriverFactory(def: NovelDefinition, appConfig: AppConfig): for (const addonName of (def.stealth?.addons ?? [])) { const addonPath = path.resolve(appConfig.addons.directory, addonName); - const addonData = readFileSync(addonPath); - options.addExtensions(addonData); + options.addExtensions(addonPath); } return new Builder()