Advertisement
dereksir

Untitled

Nov 6th, 2023 (edited)
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. //..
  2.  
  3.     static void Main()
  4.     {
  5.  
  6.         //..
  7.  
  8.         // Select a random proxy configuration
  9.         var random = new Random();
  10.         int randomIndex = random.Next(proxies.Count);
  11.         string randomProxy = proxies[randomIndex];
  12.  
  13.         // Create a new ChromeOptions instance
  14.         ChromeOptions options = new ChromeOptions();
  15.  
  16.         // Assign proxy to chrome instance using AddArgument
  17.         options.AddArgument($"--proxy-server={randomProxy}");
  18.         options.AddArgument("headless");
  19.  
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement