Use HTTPS for speedtest.net URLs
speedtest.net is available over HTTPS, so let’s use that.
This commit is contained in:
parent
795bc51da4
commit
9338c180b1
|
@ -305,7 +305,7 @@ def getConfig():
|
||||||
we are interested in
|
we are interested in
|
||||||
"""
|
"""
|
||||||
|
|
||||||
uh = urlopen('http://www.speedtest.net/speedtest-config.php')
|
uh = urlopen('https://www.speedtest.net/speedtest-config.php')
|
||||||
configxml = []
|
configxml = []
|
||||||
while 1:
|
while 1:
|
||||||
configxml.append(uh.read(10240))
|
configxml.append(uh.read(10240))
|
||||||
|
@ -342,7 +342,7 @@ def closestServers(client, all=False):
|
||||||
distance
|
distance
|
||||||
"""
|
"""
|
||||||
|
|
||||||
uh = urlopen('http://www.speedtest.net/speedtest-servers-static.php')
|
uh = urlopen('https://www.speedtest.net/speedtest-servers-static.php')
|
||||||
serversxml = []
|
serversxml = []
|
||||||
while 1:
|
while 1:
|
||||||
serversxml.append(uh.read(10240))
|
serversxml.append(uh.read(10240))
|
||||||
|
@ -659,9 +659,9 @@ def speedtest():
|
||||||
(ping, ulspeedk, dlspeedk, '297aae72'))
|
(ping, ulspeedk, dlspeedk, '297aae72'))
|
||||||
.encode()).hexdigest()]
|
.encode()).hexdigest()]
|
||||||
|
|
||||||
req = Request('http://www.speedtest.net/api/api.php',
|
req = Request('https://www.speedtest.net/api/api.php',
|
||||||
data='&'.join(apiData).encode())
|
data='&'.join(apiData).encode())
|
||||||
req.add_header('Referer', 'http://c.speedtest.net/flash/speedtest.swf')
|
req.add_header('Referer', 'https://c.speedtest.net/flash/speedtest.swf')
|
||||||
f = urlopen(req)
|
f = urlopen(req)
|
||||||
response = f.read()
|
response = f.read()
|
||||||
code = f.code
|
code = f.code
|
||||||
|
@ -677,7 +677,7 @@ def speedtest():
|
||||||
print_('Could not submit results to speedtest.net')
|
print_('Could not submit results to speedtest.net')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print_('Share results: http://www.speedtest.net/result/%s.png' %
|
print_('Share results: https://www.speedtest.net/result/%s.png' %
|
||||||
resultid[0])
|
resultid[0])
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue