Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] 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 -- http://mail.python.org/

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
Thanks Kent that works perfectly.. How can I strip all the HTML and create easily a dictionary of {location:price} ?? -- http://mail.python.org/mailman/listinfo/python-list

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hey Kent, > > thanks for your reply. how did you exactly save the file in firefox? if > I save the file locally I get the same error. The Firefox version, among other things, turns all the funky and tags into comments. Here is a way to do the same thing with BS: imp

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
so it must be the malformed HTML comment that is confusing BS. I might try different methods to see if I get the same problem... thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hey Kent, > > thanks for your reply. how did you exactly save the file in firefox? if > I save the file locally I get the same error. I think I right-clicked on the page and chose "Save page as..." Here is a program that shows where BS is choking. It finds the last lea

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
Hey Kent, thanks for your reply. how did you exactly save the file in firefox? if I save the file locally I get the same error. print len(soup('table')) gives me 4 instead 25 -- http://mail.python.org/mailman/listinfo/python-list

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I'm trying to get the data on the "Central London Property Price Guide" > box at the left hand side of this page > http://www.findaproperty.com/regi0018.html > > I have managed to get the data :) but when I start looking for tables I > only get tables of depth 1 how do I

scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
I'm trying to get the data on the "Central London Property Price Guide" box at the left hand side of this page http://www.findaproperty.com/regi0018.html I have managed to get the data :) but when I start looking for tables I only get tables of depth 1 how do I go about accessing inner tables? sam