Hi there, I have the following using Beautiful Soup: soup = BeautifulSoup(data) tags = soup.findAll(href=re.compile("/MER_FRS_L2_Canada/MER_FRS_\S +gz")) for tag in tags: print tag['href'] print tag.parent.nextSibling.string print tag.parent.nextSibling.nextSibling.string print tag.parent.nextSibling.nextSibling.nextSibling.string print tag.parent.nextSibling.nextSibling.nextSibling.nextSibling.contents[0].string
For some reason I do not understand, using 'tag' as an iterator breaks the code. Can someone tell me why? reading dir(soup) did not illuminate me. Thanks -- http://mail.python.org/mailman/listinfo/python-list