feat: create blocker for Interpreter
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
/* eslint-disable no-await-in-loop, no-restricted-syntax */
|
/* eslint-disable no-await-in-loop, no-restricted-syntax */
|
||||||
import { Page, PageScreenshotOptions } from 'playwright';
|
import { Page, PageScreenshotOptions } from 'playwright';
|
||||||
|
import { fullLists, PlaywrightBlocker, Request } from '@cliqz/adblocker-playwright';
|
||||||
|
import fetch from 'cross-fetch';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
@@ -46,6 +48,8 @@ export default class Interpreter extends EventEmitter {
|
|||||||
|
|
||||||
private log: typeof log;
|
private log: typeof log;
|
||||||
|
|
||||||
|
private blocker: PlaywrightBlocker | null = null;
|
||||||
|
|
||||||
constructor(workflow: WorkflowFile, options?: Partial<InterpreterOptions>) {
|
constructor(workflow: WorkflowFile, options?: Partial<InterpreterOptions>) {
|
||||||
super();
|
super();
|
||||||
this.workflow = workflow.workflow;
|
this.workflow = workflow.workflow;
|
||||||
|
|||||||
Reference in New Issue
Block a user