Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Codigo
- #!/usr/bin/python3
- import requests
- from bs4 import BeautifulSoup
- r = requests.get('http://10.10.10.173')
- soup = BeautifulSoup(r.content, 'html.parser')
- name = soup.find_all(class_='message-author')
- def names(name):
- for i in range(len(name)):
- print (name[i].get_text())
- if __name__ == '__main__':
- names(name)
- Resultado
- ---------
- Richard Miles
- John Doe
- Tarah Shropshire
- Mike Litorus
- Catherine Manseau
- Domenic Houston
- Buster Wigton
- Rolland Webber
- Claire Mapes
- Melita Faucher
- Jeffery Lalor
- Loren Gatlin
- Tarah Shropshire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement