Created
August 18, 2013 18:44
-
-
Save renfredxh/6263247 to your computer and use it in GitHub Desktop.
Scrape and print a site's HTML with python 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from urllib.request import urlopen | |
| from bs4 import BeautifulSoup | |
| webpage = urlopen('https://www.google.com') | |
| soup = BeautifulSoup(webpage) | |
| print(soup.prettify()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment