diff --git a/ssrspeed/speed_test/speed_test.py b/ssrspeed/speed_test/speed_test.py index c1dab93..f4ab1c6 100644 --- a/ssrspeed/speed_test/speed_test.py +++ b/ssrspeed/speed_test/speed_test.py @@ -271,8 +271,10 @@ def __geoIPOutbound(self): "https": "socks5h://127.0.0.1:%d" % LOCAL_PORT }, timeout=20, allow_redirects=False) - if (r.status_code == 200): - ytype = True + if ("is not available" in r.text): + ytype = False + elif (r.status_code == 200): + ytype = True else: ytype = False