Cómo abrir un sitio web en Python
import webbrowser
webbrowser.open('https://www.google.co.uk/')
Famous Fox
import webbrowser
webbrowser.open('https://www.google.co.uk/')
import webbrowser
url = 'www.google.com'
chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s --incognito'
webbrowser.get(chrome_path).open_new(url)
import urllib.request #pip install concat("urllib", number of current version)
my_request = urllib.request.urlopen("INSERT URL HERE")
my_HTML = my_request.read().decode("utf8")
print(my_HTML)
import webbrowser
webbrowser.open('https://www.example.com/')
import urllib.request
req = urllib.request.Request('http://www.voidspace.org.uk')
with urllib.request.urlopen(req) as response:
the_page = response.read()
#In Python 3.x, the urlretrieve function is located in the urllib.request module:
from urllib.request import urlretrieve