Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //..
- static void Main()
- {
- //..
- // Select a random proxy configuration
- var random = new Random();
- int randomIndex = random.Next(proxies.Count);
- string randomProxy = proxies[randomIndex];
- // Create a new ChromeOptions instance
- ChromeOptions options = new ChromeOptions();
- // Assign proxy to chrome instance using AddArgument
- options.AddArgument($"--proxy-server={randomProxy}");
- options.AddArgument("headless");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement