Python: Crawling Static Pages

Feb 24, 2015
As a software developer assigned to test and create crawler scripts for a few months... or years.. I would like to share to you how to scrape the page source from a static webpage.

Here's what we need:

The code is simple as:

import urllib2

# variable declaration
url = ""

# get page source
data = urllib2.urlopen(url).read()

# print source
print data

That's it. ;)

Other helpful links:

No comments:

Post a Comment