Advertisement
Azelphur

Untitled

Jul 5th, 2011
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. >>> doc = '<html><head><title>Page title</title></head><body><p>This is a paragraph</p></html>'
  2. >>> soup = BeautifulSoup(doc)
  3. >>> print soup.findAll('p')[0].text
  4. This is a paragraph
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement