Avoid redirects on hardcoded URLs
This commit is contained in:
parent
3272db0041
commit
fe0940c574
|
@ -204,7 +204,7 @@ def closestServers(client, all=False):
|
||||||
distance
|
distance
|
||||||
"""
|
"""
|
||||||
|
|
||||||
uh = urllib2.urlopen('http://speedtest.net/speedtest-servers.php')
|
uh = urllib2.urlopen('http://www.speedtest.net/speedtest-servers.php')
|
||||||
serversxml = uh.read()
|
serversxml = uh.read()
|
||||||
if int(uh.code) != 200:
|
if int(uh.code) != 200:
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -191,7 +191,7 @@ def closestServers(client, all=False):
|
||||||
distance
|
distance
|
||||||
"""
|
"""
|
||||||
|
|
||||||
uh = urllib.request.urlopen('http://speedtest.net/speedtest-servers.php')
|
uh = urllib.request.urlopen('http://www.speedtest.net/speedtest-servers.php')
|
||||||
serversxml = uh.read()
|
serversxml = uh.read()
|
||||||
if int(uh.getcode()) != 200:
|
if int(uh.getcode()) != 200:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue