-
-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iframe.contentWindow evasion causes troubles for some ad systems #137
Comments
Probably related to puppeteer/puppeteer#1106 |
As this is becoming the canonical ticket for this: The Most often you don't need this evasion and can just disable it if you experience issues: // Remove specific evasion from enabled ones dynamically
const pluginStealth = require('puppeteer-extra-plugin-stealth')()
pluginStealth.enabledEvasions.delete('iframe.contentWindow')
puppeteer.use(pluginStealth) Alternatively you could try using the adblocker plugin in tandem. There's a chance I might be able to improve the evasion so it doesn't break sites anymore but it's not my highest priority right now. |
As per #137 (comment), discarding this evasion or using an adblocker for websites full of ads might not be an option. Sometimes you do need the ads (e.g. for correct placements / layouts). Would you have some opinion on the patch proposed above? #202 (comment) Thanks! |
You can see the existing tests in https://github.com/berstend/puppeteer-extra/blob/master/packages/puppeteer-extra-plugin-stealth/evasions/iframe.contentWindow/index.test.js Run the tests locally: |
PR @ #327, closing this |
I might be confused by the threads, but has this been reopened? I'm running |
Pretty sure the issue isn't resolved altogether - the |
Hello!
I've encountered a problem with
iframe.contentWindow
evasion. It seems to be breaking some of the websites that are displaying ads and I guess it's related tosrcdoc
attribute. With plugin enabled, the ad script instead of replacing iframe HTML content replaces whole page HTML.You can see this being a case for eg. http://veganliftz.com/best-vegan-pre-workout.
Once I
pluginStealth.enabledEvasions.delete('iframe.contentWindow')
or enable adblocker, it starts to work again.The text was updated successfully, but these errors were encountered: