Advertisement
Guest User

Untitled

a guest
May 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. from bs4 import BeautifulSoup
  2.  
  3. soup = BeautifulSoup(someHTML, 'html.parser')
  4.  
  5. results = soup.findAll(class_="author")
  6.  
  7. for item in results:
  8. if 'comments' in item.parent['class']:
  9. pass
  10. else:
  11. print item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement