View Single Post
Old 09-18-2010, 01:52 PM   #2759
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by Starson17 View Post
Without testing, my thoughts would be:
1) grab the parent of item (<p>) and extract() item, leaving a p with self.tag_to_string of what you want, or
2) perhaps, just grab item.next.next.next

I always need to test to be sure, but one of those should work.
edit: I see your post above, I tested it and they both work.
This worked best:
Code:
          descr       = item.parent
          item.extract()
          descr       = self.tag_to_string(descr)
worked great thank you.
TonytheBookworm is offline