Using firefox and selenium with tor anonymously
Apparently using other applications with tor is not recommended . I followed method 2 instruction three from here and simply changed my socks host port to 9150 in firefox, so that it would match my tor brower port. According to this answer, it looks like it might be fine, but it looks like it's saying that tor has it's own version of firefox?
I'm running tor with selenium using the following commands, these commands just return a random IP address that I'm routing through
profile=webdriver.FirefoxProfile() profile.set_preference('network.proxy.type', 1) profile.set_preference('network.proxy.socks', '127.0.0.1') profile.set_preference('network.proxy.socks_port', 9150) driver=webdriver.Firefox(profile) driver.get("http://icanhazip.com") print(driver.page_source) driver.close()
See also questions close to this topic
Automatic testing with selenium
one week ago I created a script for automatic testing. Starting from yesterday I get the issue below?
DevTools listening on ws://127.0.0.1:12825/devtools/browser/2aa96c44-290f-4732-85d7-15369b2006f5 FSE Refresh | FAIL | Parent suite setup failed: WebDriverException: Message: unknown error: call function result missing 'value' (Session info: chrome=65.0.3325.181) (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.15063 x86_64)
Can the issue be related to the recent upgrade of chrome=65.0.3325.181? Any suggestion to fix the issue?.
selenium driver is launching new tab instead of new window
This is a very strange behaviour happening only on my laptop, not on other laptops. when I call chrome driver in my script(problem with only chrome, Firefox is working fine) it is opening in a new tab in existing window and scripts will not run.if I close the current chrome window and run the script scripts will run in a window which has all the extensions I tried deleting chrome from regedit and reinstall chrome and exe files. please don't say code issue because same codes I am running on all other laptops work fine.
enter image description here please see the images in image one selenium launches a new tab in existing window image 2: I close chrome window and run the script, it is opening in the default window
my scripts are running on chrome window where I save my passwords not in a new window without cache or passwords any help is appreciated this is my code
System.setProperty("webdriver.chrome.driver","C:\\myapp\\chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("https://www.irctc.co.in");
How would it do addition and End at a certain point Python
Here is my code I'[m trying by python calling a number from a text file and want to count by +1 and stop at a certain point likewise in the file there is start_point is 1 and End_point is 10
for line in file: start_point = line.split() End_point = line.split() URL = line.split() try: pageIndex = start_point while True: browser.get(URL + str(pageIndex)) time.sleep(2) pageIndex += 1 if pageIndex == End_point: break except: pass
but it is not adding +1 in the loop..
Can't access localhost in firefox
I am unable to load my local hosted sites in firefox, works perfectly fine on Chrome, and other sites work on Firefox. I don't have a firewall, didn't change any settings, and don't have anti-virus software. I am running OS.
How can I run a WebSocket server in NodeJS app with GAE?
folks I'm trying run a WebSocket server in app NodeJS with GAE, but I receive the following error:
Firefox can’t establish a connection to the server at wss://myapp.appspot.com/socket.io/?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1YWEzY2Y3ZmZmZWUzNDAwMTAwMzVlNjEiLCJpYXQiOjE1MjE2NDI2NTYsImV4cCI6MTUyMjg1MjI1Nn0._F21PRJUE2nASD8xd3KKzTKX5LX0MHrTn7V4NO9bA4g&EIO=3&transport=websocket&sid=3neQyUeTA6njdFULAAAI.
How can I solve it? Is possible run websocket on GAE?
custom codec/mime-type in Firefox
I'm trying to abuse Firefox/Quantum as an application environment for a video application. The source content is likely going to be a single frame rendered from an FPGA - presumably thru a file descriptor (/dev/something). Ideally I can create a local html page (file, not server based) and use a video element with an appropriate source/mime type to display the feed. All this will be static on a given computer/device - the video content is local, and will not be encoded for IP transmission.
I'm thumbing thru the openh264 codec provided by Cisco/Firefox to get some ideas, but that isn't really going as well as expected.
The Media Source Extension seems promising, but experimental.
Media Stream API also seems interesting, if there is a way to use a source other than the camera.
Is there an overview of how one might grab data from a local pipe and render data to a canvas/video element? In my mind's eye, its very similar to the existing video codecs without the magic of compression or overhead of a container, but I realize that's likely oversimplified.
To give a similar idea of the use case, picture a photobooth kiosk w/ multiple cameras/specialized inputs, and Firefox presenting options to the user of which feed to use, filters, etc... Firefox is merely the UI.
Benifits of a connection over a vpn over tor and again over another vpn
Not sure if it even makes sense but is there any benifit about connecting over a vpn to the tor network and then again connecting to a vpn?
The only arguments i could think of would be that the second vpn providor doesn't know who you are and neither does your isp know that youre using tor. But i could imagine that this would be highly inefficient.
Scrape a website using Selenium and Tor with python 3 on Windows 10
I know that there are many threads talking about this but i've tried many of the solutions suggested but nothing seems to work. Im gonna be very specific so you guys could please help me!
Im trying to do web scraping to a website using Selenium in Python 3 on Windows 10. This website blocks me after a certain number of requests so what I've red is that if I use Tor as the Selenium web driver I can just ask Tor for a new identity (which means a different IP) every specific number of requests.
The following code lets me do the scraping I want using Tor firefox profile in the Tor Browser folder. The only thing missing with these code is that I've havent been able to request a new identity (new IP).
profiler = webdriver.FirefoxProfile(r"C:\Users\Samir\Desktop\Tor Browser\Browser\TorBrowser\Data\Browser\profile.default") profiler.set_preference("network.proxy.type", 1) profiler.set_preference("network.proxy.socks",'127.0.0.1') profiler.set_preference("network.proxy.socks_port",9050) driver = webdriver.Firefox(firefox_profile=profiler) driver.implicitly_wait(15) driver.get("The URL I want to scrape") #Extract whatever information i want from the URL
I tried to use the Stem library to get new identity but this does not seem to work with the Tor firefox profile of the previous code.However this works fine if I just open the browser double clicking on the Tor Browser shortcut icon that is created when I install Tor.
#This is the code in stem that gets new identity using Stem. As I said, #this does not work with the selenium firefox profile for Tor. from stem import Signal from stem.control import Controller with Controller.from_port(port = 9051) as controller: controller.authenticate() controller.signal(Signal.NEWNYM)
Okay so to wrap up, is there a way to get a new IP with the previous code I showed? Or what can I do to achieve what I want using python 3, selenium and tor on windows 10 plus anyother library or whatever thats necessary.
If you have questions or need more information to help me just let me know.
Thaks a lot!!
Using Socks5 Proxy with windows wget
I am trying to use wget with a SOCKS5 proxy, sadly it's on windows and it seems like natively wget does not support SOCKS5. I've looked into curl for windows, which does support SOCKS5 but does not quite replaces wget for my intentions. Somewhere someone (cant find source again) suggested to use Putty as a tunnel, I did not understand that concept and it was not further explained. I've also tried to find a tsocks alternative for windows, but again, there was nothing. Is there a elegant way to use wget on windows with a SOCKS5 proxy ?