Python code to grab the HTML of Google’s Home Page

Using urllib and requests

Graham Waters

--

Photo by Mitchell Luo on Unsplash
import urllib.request# for http requestsweburl = urllib.request.urlopen(“http://www.google.com") # gives a web response object as it’s returned value

We can grab the data in html format quite easily for google.com and save it in a variable named “Data” as…

--

--