Untitled
unknown
csharp
2 years ago
1.6 kB
8
Indexable
private void DivisionStart() { foreach(var account in BotConfig.AccountList) { while (CurrentBotThreads >= BotConfig.MaxLoginsAtSameTime) { Thread.Sleep(1000); } StartedBotThreads++; CurrentBotThreads++; int startIndex = (StartedBotThreads * BotConfig.AdsPerAccount + 1) - BotConfig.AdsPerAccount - 1; int stopIndex = BotConfig.AdsPerAccount * CurrentBotThreads; if (stopIndex > BotConfig.ProductList.Count) { stopIndex = BotConfig.ProductList.Count; } Debug.Print("Thread: " + StartedBotThreads); var adList = GetAdListBy(startIndex, stopIndex); foreach(var ad in adList) { Debug.Print("Für thread: " + StartedBotThreads + " | Anzeige: " + ad.AdTitle); } Debug.Print("Parallel"); var ebayBotThread = new Thread(() => { var botOptions = new IBotOptionsModel() { CaptchaSolverApiKey = CaptchaSolverApiKey, ReCaptchaSiteKey = "6LcZlE0UAAAAAFQKM6e6WA2XynMyr6WFd5z1l1Nr", StartPageUrl = "https://www.ebay-kleinanzeigen.de/m-einloggen.html?targetUrl=/", EbayLoginEmail = account.AccountEmail, EbayLoginPassword = account.AccountPassword, Ads = adList, }; var ebayBot = new EbayBot(this, botOptions); ebayBot.Start(StartedBotThreads); Thread.Sleep(5000); }); ebayBotThread.Start(); } }
Editor is loading...