-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cannot add Extension to chrome V2 #154
Comments
@ultrafunkamsterdam hi thanks for chromedriver. I also cannot add an extension. Is this a bug? @ultrafunkamsterdam extensions work for you? |
No. Extensions do not work in combination with remote debugging (which is used by this module). |
got it. maybe there is some way out to add auth proxy? (I tried seleniumwire - there is a problem with mitmproxy that changes fingerprint and cloudflare returns 503 error. I also thought about an extension that would help with a proxy - but remote debugging does not work with the extension). you have more knowledge - is there any way out? v2 works fine, but damn I need to work with auth proxy |
Fingerprint is not a network thing so mitm proxy wouldn't change it. That's for sure 😉 |
well i don't have enough knowledge, and i read this there mitm and selenium-wire. |
no solutions at all?( What happens if remove remote debugging? won't bypass cloudflare? (remove for the ability to install extensions with auth proxy) |
@ultrafunkamsterdam Sorry to bother you, I guess I'm already bored you) I found a couple of possibilities 1 and 2 (use --load-extension to load the extension for the remote debugging browser, this line with arguments), I tried but got an error |
I've managed to load extensions by extracting the CRX file into a folder and then using |
Hello @the-white-light , can you elaborate how you approached it with |
Can you kindly explain in detail how this works? a sample code will be much appreciated. Thanks |
You had it mostly right, but as I said before you need to extract the extension first, then direct the code to the destination folder. I extracted the .crx file to |
@the-white-light yes, I have extracted the extension into .crx file and saved in the same directory(folder): tried it...still doesn't work. Here is my entire code: import undetected_chromedriver as uc def main(): if name == 'main': |
Please re-read what I wrote. You need to extract the crx, and it is not used in the code. You downloaded the crx file, which is basically just a zip file. Extract it then point your code to the destination folder. |
did that. |
|
@the-white-light thanks, my mistake. does the .crx file needs to be the only file in the subfolder? |
No, you just extract it into a folder and point your code to that. |
I know it's late to add this comment but it might help someone in the future. When you extract the extension, point your code to the full path of the extracted folder like |
chrome_options = Options()
chrome_options.add_argument('user-data-dir='+profiles[i])
chrome_options.add_extension('data/exten.crx')
driver = uc.Chrome(options=chrome_options)
Why v2 cannot add extension?
The text was updated successfully, but these errors were encountered: