feat: playwright adblocker
This commit is contained in:
@@ -13,6 +13,8 @@ import { InterpreterSettings, RemoteBrowserOptions } from "../../types";
|
||||
import { WorkflowGenerator } from "../../workflow-management/classes/Generator";
|
||||
import { WorkflowInterpreter } from "../../workflow-management/classes/Interpreter";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class represents a remote browser instance.
|
||||
* It is used to allow a variety of interaction with the Playwright's browser instance.
|
||||
@@ -90,6 +92,7 @@ export class RemoteBrowser {
|
||||
this.browser = <Browser>(await options.browser.launch(options.launchOptions));
|
||||
const context = await this.browser.newContext();
|
||||
this.currentPage = await context.newPage();
|
||||
const blocker = await PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch);
|
||||
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user