Skip to content Skip to sidebar Skip to footer

Python - Adding Correct Protocol When User Inputs A Domain Name

I want my program to take a command line argument like 'google.com' and get source code back using Selenium: driver = webdriver.Firefox() driver.get(sys.args[0]) However, I get is

Solution 1:

If you leave it as http and the site requires https, it will redirect the client to the https page. Leave it as http and let Selenium handle the rest.


Post a Comment for "Python - Adding Correct Protocol When User Inputs A Domain Name"