scraping nested tables with BeautifulSoup

Kent Johnson kent at kentsjohnson.com
Tue Apr 4 13:21:31 EDT 2006


Gonzillaaa at gmail.com wrote:
> Thanks Kent that works perfectly.. How can I strip all the HTML and
> create easily a dictionary of {location:price}  ??

This should help:

prices = priceGuide.table

for tr in prices:
     print tr.a.string, tr.a.findNext('font').string

Kent



More information about the Python-list mailing list