View Single Post
Old May 22nd, 2006, 11:28 AM   #104
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Yep; in theory you could do something like:
soup.fetch("table")[5].fetch("tr")[2].fetch("td")[1].string
That would get you the contents of the cell on the 3rd row down and 2rd column across, on the fifth table on the page. The fetch method works with any tag.

(The .string at the end gets the contents of the tag, just as ['href'] gets the href attribute of the tag)
Arevos is offline   Reply With Quote