Merge pull request #248 from getmaxun/docker-arm
fix: explicitly set easylist url
This commit is contained in:
@@ -102,7 +102,7 @@ export default class Interpreter extends EventEmitter {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch).then(blocker => {
|
PlaywrightBlocker.fromLists(fetch, ['https://easylist.to/easylist/easylist.txt']).then(blocker => {
|
||||||
this.blocker = blocker;
|
this.blocker = blocker;
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.log(`Failed to initialize ad-blocker:`, Level.ERROR);
|
this.log(`Failed to initialize ad-blocker:`, Level.ERROR);
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ export class RemoteBrowser {
|
|||||||
// await this.currentPage.setExtraHTTPHeaders({
|
// await this.currentPage.setExtraHTTPHeaders({
|
||||||
// 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
|
// 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
|
||||||
// });
|
// });
|
||||||
const blocker = await PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch);
|
const blocker = await PlaywrightBlocker.fromLists(fetch, ['https://easylist.to/easylist/easylist.txt']);
|
||||||
await blocker.enableBlockingInPage(this.currentPage);
|
await blocker.enableBlockingInPage(this.currentPage);
|
||||||
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
|
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
|
||||||
await blocker.disableBlockingInPage(this.currentPage);
|
await blocker.disableBlockingInPage(this.currentPage);
|
||||||
|
|||||||
Reference in New Issue
Block a user