-
Notifications
You must be signed in to change notification settings - Fork 39
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
Doesn't work with multiple tabs #13
Comments
Hello, the purpose of the second recommended usage is to be able to perform tasks such as installing Chrome extensions. When starting Chromium and providing the command to load a Chrome extension into flags, it does not install the extension. This situation applies only during the initial use. By default, a Chromium instance is launched and connected with Puppeteer without allowing for loading Chrome extensions when connecting with .connect. Therefore, those who do not require actions like installing extensions may prefer the default usage. However, for tasks such as installing Chrome extensions or specifying args, there is a need for the second usage. |
In your examples you dont refer to extensions as it seems to be the main point now? there is no example too... |
The primary browser is not launched with puppeteer. We are launching it with Chromium. I tried to install an extension on Chromium via command line for a few hours, but it didn't work or I couldn't succeed, and I didn't have time to investigate this deeply. Therefore, I presented 2 usages. The first one starts Chromium and connects with puppeteer.connect to return the browser and page variables. Only 1 browser opens in this method. However, the Chrome extension cannot be loaded in this case. |
Hmm strange, did you try passing the path of the extention or the .crx? Because the later seems to be more problematic. |
I tried different folder types in crx. However, when I tried, the Chromium library example was starting with chromium library. Now I am starting with @sparticuz/chromium. Maybe extensions can be loaded in this browser example. |
You are welcome, the fact of using two browsers was just looking a bit strange to me...maybe there are other advantages that Im missing. Anyway .crx installation probably can be automated too becouse its just a zip in the end. |
Btw there is something wrong with my approach as it seems to fail cloudflare baypass... where you method works. |
Got a guess. Using your script if I call |
targetfilter prevents this. But I will definitely try to find a solution, I have updated the library. Thank you for your contributions. |
Yes, thanks for the update. Here a test case.
|
I'll post an update soon |
maybe a solution would be to disconnect puppeteer if certain url matches and connect to it later after making sure its not a protected page... btw the problem might still bite back if they check the framework presence on following pages |
I have released an update, could you please try and use it as it is in the readme file? |
Sure thing |
I was wondering was is different about this project. I get that it helps to bootstrap the real browser and connect to it.
But what i dont get is why you launch 2 browser, first one that is hidden and the next one that is being used.
Doesn't launching a single browser directly and connect to it have the same effect with much less overhead?
The text was updated successfully, but these errors were encountered: