Advertisement
TTpocToXaKep

Internet SpeedTest 3 choose

Jan 31st, 2023 (edited)
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | Cybersecurity | 0 0
  1. # pip install speedtest-cli
  2. # pip install speedtest
  3. import speedtest  
  4.  
  5.  
  6. st = speedtest.Speedtest()
  7. option = int(input('''
  8. Type:  
  9.  
  10. 1 - Speed downloading  
  11. 2 - Speed uploading  
  12. 3 - Ping
  13.  
  14. You're choose: '''))
  15.  
  16.  
  17. if option == 1:  
  18.     print(st.download())  
  19. elif option == 2:  
  20.     print(st.upload())  
  21. elif option == 3:  
  22.     servernames =[]  
  23.     st.get_servers(servernames)  
  24.     print(st.results.ping)    
  25. else:
  26.     print("Please choose 1/2/3!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement