zytedata / zyte-smartproxy-plugin

A plugin for playwright-extra and puppeteer-extra to provide Smart Proxy Manager specific functionalities.
https://www.npmjs.com/package/zyte-smartproxy-plugin
MIT License
3 stars 0 forks source link

First request in popup window is not intercepted #2

Open geronsv opened 1 year ago

geronsv commented 1 year ago

X-Crawlera headers are not inserted into the first request in popup window

geronsv commented 1 year ago

Workaround: replace popup with redirect:

  var replacePopupWithRedirect = function(){
    window.super_open = window.open;
    window.open = function (url, windowName, windowFeatures) {
        window.super_open(url, "_self", windowFeatures);
    } 
  }
  await page.evaluate(replacePopupWithRedirect);