Python: Scrape pages and extract information

I was amazed at how incredibly easy it was to scrape pages using Python.

To download the page markup, use:

import urllib
content = urllib.urlopen("").read()

Once you have the content, simply use regex to parse the bit you want.

import re
m ='class="pr".*?>(.*?)<', content)

if m:
quote =

[ Source ]

Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog