Open gokanil opened 2 years ago
Yes, that's right. I tested proxy and it works fine.
You can refer to some discussions in this issue. https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/587#issuecomment-1096591305
Okay, This worked thanks. options.AddArgument($"--proxy-server=socks5://{proxy}");
I want to ask something off topic. When I change my location, websites can detect that it is fake. Do you have a solution?
Sorry, I have less experience in this.
I suggest you can go to undetected-chromedriver to see their discussionm, they have a lot of experience and solutions.
This repo is C# implementation of undetected-chromedriver, many solutions is generic.
I opened an employment for the Location issue. Now I'll tell you something different.
var options = new ChromeOptions(); options.AddExtension("test.crx");
Nothing happens when I try to install an extension. But it works when I use the same code with 'OpenQa.Selenium.Chrome'. Can you look at this?
Try it.
options.AddArgument("--load-extension=test.crx")
In UndetectedChromeDriver, other functions except AddArgument cannot be used, the code will use the Arguments parameter to start the chrome process.
var args = options.Arguments
.Select(it => it.Trim())
.Aggregate("", (r, it) => r + " " +
(it.Contains(" ") ? $"\"{it}\"" : it));
var info = new ProcessStartInfo(options.BinaryLocation, args);
...
var browser = Process.Start(info);
With 'load-extension' I can only load unpackaged (folder) plugins. So I had to extract my crx file. He's seen my work for now. It would be much better for me if I could install it as a package file. Thank you.
ref: link
Sadly can only do that, or use userDataDir and then install the package manually.
I can't load 2 extension folders at once. it only accepts the last extension options.AddArgument("--load-extension=" + pathex1); options.AddArgument("--load-extension=" + pathex2); it only accepts extension pathex2
Use commas to concate.
--load-extension=extension1,extension2
I tried the code below but my ip address did not change. How to connect to proxy?
options.AddArguments("--proxy-server=x.x.x.x:8080");