Hello, I read the token from the site a certain number of times. tell me how to take a new proxy every time you log into the cycle All proxies are stored in a text file. This is what I do:
static CookieDictionary cook = new CookieDictionary(); String token = string.Empty; string GET(string url)//получение токена { var Proxy = File.ReadLines("proxy.txt").ToList(); var count = Proxy.Count; for (int i = 0; i < (int)numericUpDown1.Value; i++) { foreach (var list in Proxy) { System.Threading.Thread.Sleep(500); var request = new HttpRequest(); request.UserAgent = HttpHelper.ChromeUserAgent(); request.Proxy = HttpProxyClient.Parse(list); request.Cookies = cook; HttpResponse response = request.Get(url); var z = response.ToString(); Match res = Regex.Match(z, "var AUTH_TOKEN = \"(.*)\";"); token = res.Groups[1].ToString(); } } return token; } but all proxies are loaded at once into the list variable when prompted, how to ensure that the next proxy is taken at each cycle entry?