I try to connect to a specific site using Selenium WebDriver Firefox through TOR Socks5 at 9050 port and I can't establish the connection.
profile = FirefoxProfile()
profile.set_preference('network.proxy.type', 1)
profile.set_preference( "network.proxy.socks_version", 5 )
profile.set_preference('network.proxy.socks', '127.0.0.1')
profile.set_preference('network.proxy.socks_port', 9050)
profile.set_preference( "network.proxy.socks_remote_dns", True )
browser = webdriver.Firefox(firefox_profile=profile)
The site is probably blocking some TOR connections but the odd thing is that I can connect to it using TorBrowser! I even found the exit node that was used by TorBrowser and edited my torrc file to use it too (ExitNodes 'ip'). I checked that my selenium Firefox's exit node was the same (I can successfuly connect to other sites through TOR proxy and check my ip), but I still can't connect, even using the same ip! Where is my mistake?
And the second thing is that if I set up:
profile.set_preference('network.proxy.socks_port', 9150)
i.e. use TorBrowser proxy, selenium Firefox successfully establishes connection to the site .
Is it something wrong with my tor settings?