On Thu, 19 Mar 2015 21:20:30 -0700, Sayth Renshaw wrote:
> But how can I get the value of the following td
# find all tds with a class attribute of "abbreviation"
abbtds = soup.find_all("td", attrs={"class": "abbreviation"})
# display the text of each abbtd with the text of the next td
for td in abbtds:
print td.get_text(), td.find_next_sibling().get_text()
This works for the html fragment example given, once I fixed it up by
removing the extra <tr> at the end.
--
Denis McMahon, [email protected]
--
https://mail.python.org/mailman/listinfo/python-list