Fixed description and code for this amazing project origin/Minor-fixes
authorJosue Rodriguez <josuer08@gmail.com>
Sat, 17 Oct 2020 03:01:21 +0000 (23:01 -0400)
committerJosue Rodriguez <josuer08@gmail.com>
Sat, 17 Oct 2020 03:01:21 +0000 (23:01 -0400)
README.md
spdtest.py

index cd36537a87498e48c7e93cf1b3d968dfe328953c..67d91f87b8d287743d20120f334ae947b7f0ec7a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,12 +1,11 @@
 # speedtestpy
-using speedtest in python
 
-to install speedtest first use:
+## Running
 
-debian : $ sudo apt-get install python-pip
-arch   : $ sudo pacman -S python-pip
+1. Install pip:
+  + Debian : `$ sudo apt-get install python-pip`
+  + Arch   : `$ sudo pacman -S python-pip` ~~Not mandatory~~
 
-then:
-
-debian : $ sudo pip install speedtest-cli
-arch   : $ sudo pacman -S speedtest-cli
+1. Install python library:
+  + Debian : `$ sudo pip install speedtest-cli`
+  + Arch   : `$ sudo pacman -S speedtest-cli`
index e77b6dd694541265e5b2a882134c1fb57e6cc8a4..079f5d29b3c6ba90784343c2a8f764cacc03f663 100644 (file)
@@ -1,8 +1,13 @@
 import speedtest
+import pprint
+pp = pprint.PrettyPrinter(indent=4)
 #first we need impot speedtest check it how you can do it in your OS
-
+servers = []
 st = speedtest.Speedtest()
-
+st.get_servers(servers)
+bestservers = st.get_best_server()
+print("The best server found for this test is")
+pp.pprint(bestservers)
 def testing(option,option1,option2):
 
        if option == 1 and option1 == 2 and option2 == 3:
@@ -19,7 +24,7 @@ def testing(option,option1,option2):
        else:
                print("Please enter the correct choice!")
 
-print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
+print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
 print("Test in process please wait...")
 testing(1,2,3)
-print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
\ No newline at end of file
+print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")