Python Forum

Full Version: How to get a URL from python 'webbrowser'?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using 'webbrowser' for opening multiple tabs in Chrome/Firefox.
For example:
webbrowser.get("open -a /Applications/Firefox.app %s").open('http://google.com',new=1)
But the problem is, in somecases, the url gets changed(may be redirected to captcha provider), then I have to stop opening new tabs and terminate. Is there any way to read the URL after opening it using 'webbrowser'?

Here, 'Selenium' doesn't help me, because I need some extensions to be installed in the browser and I have to provide my login details and configure some settings in that extensions/plugins. So, I don't think selenium webdriver will be useful here.

Can you suggest any solution for this?

Thanks a lot in advance!