import sys
import speedtest

def main():
    s = speedtest.Speedtest(secure=True)

    if (sys.argv[1] == 'd') or (sys.argv[1] == 'b'):
        gbdl = round( s.download() / (1024*1024) , 2)
        print("󰛴", gbdl, "Mb/S")

    if (sys.argv[1] == 'u') or (sys.argv[1] == 'b'):
        gbul = round( s.upload() / (1024*1024) , 2)
        print("󰛶", gbul, "Mb/S")

if __name__=="__main__":
    main()


