public ShortnewsViewsGenerator(string targetUrl)
        {
            this.targetUrl = targetUrl;
            // Selenium initialisieren
            var torSocksProfile = FirefoxDriverCreator.SetSocksProxy("127.0.0.1", 9050);

            driver = FirefoxDriverCreator.CreateFirefoxDriverWithAdblock(torSocksProfile);
            // Tor starten und auf einen Circuit warten
            tor            = new TorInstance(9050, @"Tor\Tor");
            tor.OnCircuit += Tor_OnCircuit;
            tor.KillAllTorProcesses();
            tor.Start();
        }
Exemple #2
0
        public void Start(bool useTor)
        {
            if (useTor)
            {
                tor            = new TorInstance(9050, @"Tor\Tor");
                tor.OnCircuit += Tor_OnCircuit;;
                tor.KillAllTorProcesses();
                tor.Start();

                var torSocksProfile = FirefoxDriverCreator.SetSocksProxy("127.0.0.1", 9050);
                driver = FirefoxDriverCreator.CreateFirefoxDriverWithAdblock(torSocksProfile);
            }
            else
            {
                if (driver == null)
                {
                    driver = FirefoxDriverCreator.CreateFirefoxDriverWithAdblock();
                }
                StartVoting();
            }
        }