Updated scraper.ts
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user