I was amazed at how incredibly easy it was to scrape pages using Python.
To download the page markup, use:
content = urllib.urlopen("http://finance.google.com/finance?q=IBM").read()
Once you have the content, simply use regex to parse the bit you want.
m = re.search('class="pr".*?>(.*?)<', content)
quote = m.group(1)
[ Source ]