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