import { Logger } from '~/models/logger'; import type { LoggingService } from '~/models/logging-service'; import { RTScraperGeneric } from '~/models/rt-scraper-generic'; const bodyProducer = (html: string): HTMLBodyElement => { const body = document.createElement('body'); body.innerHTML = html; return body; }; const fetcher = fetch.bind(window); export class RTScraper extends RTScraperGeneric { constructor ( shouldLog = true, // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types loggingService: LoggingService = console ) { super(fetcher, bodyProducer, shouldLog, new Logger(loggingService)); } }