Wednesday, April 8, 2009

simple webscraper in python

Found this on the python lists:

import os
site = 'website.com'
X = os.popen('lynx --dump %s' % site).readlines()


Obviously, you need lynx on your system. Links and elinks can probably be suitable replacements.

Coolness.

No comments: