Пример #1
0
        private static async void SplashTimer_TickAsync(object sender, EventArgs e)
        {
            if (driver == null && splash.Visible)
            {
                splashTimer.Stop();
                var update = new ChromeDriverUpdater(".\\");
                await update.ExecuteAsync();

                Bootstrap();
                splash.Close();
            }
        }
Пример #2
0
        public MangaHereTests()
        {
            var updater = new ChromeDriverUpdater(".\\");

            updater.ExecuteAsync().Wait();
            source = new CancellationTokenSource();

            var options = new ChromeOptions();

            options.AddArgument("--window-size=1920,1080");
            options.AddArgument("--start-maximized");
            options.AddArgument("--headless");
            ChromeDriver = new ChromeDriver(options);
            Wait         = new WebDriverWait(ChromeDriver, TimeSpan.FromSeconds(10));


            downloader = new HttpDownloader(new FilenameDetector(new GoogleProxyFilenameDetector()));
            service    = new MangaHere(logger.Object, downloader, new XPathSelector(), new Retry(), ChromeDriver);
        }
Пример #3
0
 public async void UpdateAsync()
 {
     var driverUpdate = new ChromeDriverUpdater(".\\");
     await driverUpdate.ExecuteAsync();
 }