Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- soup = BeautifulSoup(someHTML, 'html.parser')
- results = soup.findAll(class_="author")
- for item in results:
- if 'comments' in item.parent['class']:
- pass
- else:
- print item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement