Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Codigo
  2. #!/usr/bin/python3
  3.  
  4. import requests
  5. from bs4 import BeautifulSoup
  6.  
  7. r = requests.get('http://10.10.10.173')
  8. soup = BeautifulSoup(r.content, 'html.parser')
  9. name = soup.find_all(class_='message-author')
  10.  
  11. def names(name):
  12.  
  13. for i in range(len(name)):
  14. print (name[i].get_text())
  15.  
  16. if __name__ == '__main__':
  17.  
  18. names(name)
  19.  
  20. Resultado
  21. ---------
  22.  
  23. Richard Miles
  24. John Doe
  25. Tarah Shropshire
  26. Mike Litorus
  27. Catherine Manseau
  28. Domenic Houston
  29. Buster Wigton
  30. Rolland Webber
  31. Claire Mapes
  32. Melita Faucher
  33. Jeffery Lalor
  34. Loren Gatlin
  35. Tarah Shropshire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement