-
Notifications
You must be signed in to change notification settings - Fork 38
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
Access to iframe content #86
Comments
What do you mean by lost? Was it working before the patches? Do you use the latest patches version? |
After the patch Example code: `process.env.REBROWSER_PATCHES_RUNTIME_FIX_MODE = "alwaysIsolated" import puppeteer from 'rebrowser-puppeteer-core'; (async () => // Maybe we need to wait a little longer const iframeSrc = 'https://newassets.hcaptcha.com/captcha/v1/'; // we can't access the context of the frame await browser.close(); })();` We don't have access to the frame context, if we set 'enableDisable' instead of 'alwaysIsolated' we can access the frame but cpd will be detected One solution I found is to use postMessage and process everything in evaluateOnNewDocument |
You should use |
Yes, i know it will work, but some websites detect it. It only works if you use process.env.REBROWSER_PATCHES_RUNTIME_FIX_MODE = "alwaysIsolated" |
Do you have any examples when it's being detected? |
Repeating this will be difficult as we need to recognize the captcha. Here we will be dealing with an iframe and will encounter the following:
The most important problem is the second point. Even if we solved the captcha, the password will always be wrong and this is a signal that the site has identified you as a bot. When we use alwaysIsolated and the example from https://rebrowser.net/blog/how-to-access-main-context-objects-from-isolated-context-in-puppeteer-and-playwright, everything is fine, the CSP is not detected. You can use this approach for the frame as well. Your solution works well if we, for example, submit a form via postMessage, submit a button selector, and in evaluateOnNewDocument click, while manually entering the username at the same time Example:
|
Lost access to iframe content, is there any way to fix this?
What I tried:
await page.setBypassCSP(false); --disable-gpu-sandbox
The text was updated successfully, but these errors were encountered: