code_junkie

Filter out HTML tags and resolve entities in python

Nov 10th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. import lxml.html
  2. t = lxml.html.fromstring("...")
  3. t.text_content()
  4.  
  5. <div>5 < 7</div>
  6.  
  7. < 7</div>
Add Comment
Please, Sign In to add comment