Created
December 16, 2013 05:09
-
-
Save studiawan/7982585 to your computer and use it in GitHub Desktop.
HTTP client using urllib2 & beautifulsoup parser
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
# get short tutorial here: http://www.pythonforbeginners.com/python-on-the-web/beautifulsoup-4-python/ | |
import urllib2 | |
from bs4 import BeautifulSoup | |
response = urllib2.urlopen('http://www.studiawan.com').read() | |
soup = BeautifulSoup(response) | |
print soup.title.string | |
print soup.get_text() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment