Open Drey7k opened 6 months ago
Check the accepted answer.
thanks but already tried and not working
Any idea how to make it work ?
I cannot seem to be able to load the extension that I create into the no driver chrome browser.
I have tried with config.add_extension=extensionDir
, config.add_argument = r'--load-extension='+extensionDir
, and browser = await uc.start(browser_args=['--load-extension='+extensionDir])
and none of them loads the extension properly (manifest + json), which works properly on the old undetected-chrome.
The config argument for a data_dir for example works properly, but not for extensions.
Any idea how to make it work ? I cannot seem to be able to load the extension that I create into the no driver chrome browser. I have tried with
config.add_extension=extensionDir
,config.add_argument = r'--load-extension='+extensionDir
, andbrowser = await uc.start(browser_args=['--load-extension='+extensionDir])
and none of them loads the extension properly (manifest + json), which works properly on the old undetected-chrome. The config argument for a data_dir for example works properly, but not for extensions.
I have the same problem with NoDriver. It is interesting to note that this appears under Centos, but under Windows 10 it works fine. nodriver 0.29rc2 Python 3.12.3 undetected-chromedriver 3.5.5 Google Chrome 124.0.6367.118
That's weird, I'm on windows 10 and it does not work. I tried using manifest v2 and v3 to no avail. I tried opening a window and then loading the extension manually, and it does work though.
MANIFEST.JSON and BACKGROUND.JS:
{
"version": "1.0.0",
"manifest_version": 2,
"name": "Proxies",
"permissions": [
"proxy",
"tabs",
"unlimitedStorage",
"storage",
"<all_urls>",
"webRequest",
"webRequestBlocking"
],
"background": {
"scripts": ["background.js"]
},
"minimum_chrome_version":"22.0.0"
}
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: "X.X.X.X",
port: parseInt(X)
},
bypassList: ["localhost"]
}
};
chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
function callbackFn(details) {
return {
authCredentials: {
username: "xxxxxx",
password: "xxxxxx"
}
};
}
chrome.webRequest.onAuthRequired.addListener(
callbackFn,
{urls: ["<all_urls>"]},
['blocking']
);
Yeah thanks, I have something like that yes, but no driver won't load it... i create both files and try to load them with the previously mentioned methods, but it doesn't load it. But if I open an uc no driver window, and go to extensions, I can select that same directory it created and it will load the extension well... (I have to enable developer mode before though...) Are you using no driver or undetected-chromedriver ? (in undetected it works just fine)
Proxy authorization with undetected-chromedriver works fine for me on both Centos and Windows 10. The problem is with NoDriver.
Apparently, I found the cause of the problem with NoDriver under Centos. The extension didn`t have time to load due to a rather slow VPS.
Solution:
Edit File: nodriver/core/browser.py
It would be great to add this option to the settings.
Did not work for me, but thanks for updating !
Found a solution for mine, I was using add_extension
wrong, the right way to do it is config1.add_extension(extensionDir)
unlike user_data_dir
or browser_executable_path
Found a solution for mine, I was using
add_extension
wrong, the right way to do it isconfig1.add_extension(extensionDir)
unlikeuser_data_dir
orbrowser_executable_path
FYI, passing a direct browser argument into nodriver does work correctly: f"--load-extension={ublock_extension_path}".
hello, I want to use proxies list from a txt (ip:port:user:pass) for a simple ATC script, I am looking for an exemple because I tried tons of things and spent 2 days without any result. Have a good day