Spaces:
Paused
Paused
upload
Browse files- check_proxy.py +1 -1
check_proxy.py
CHANGED
@@ -5,12 +5,12 @@ ChatGPT:
|
|
5 |
"""
|
6 |
def check_proxy(proxies):
|
7 |
import requests
|
|
|
8 |
try:
|
9 |
response = requests.get("https://ipapi.co/json/", proxies=proxies, timeout=4)
|
10 |
data = response.json()
|
11 |
country = data['country_name']
|
12 |
# city = data['city']
|
13 |
-
proxies_https = proxies['https'] if proxies is not None else '无'
|
14 |
result = f"代理配置 {proxies_https}, 代理所在地:{country}"
|
15 |
print(result)
|
16 |
return result
|
|
|
5 |
"""
|
6 |
def check_proxy(proxies):
|
7 |
import requests
|
8 |
+
proxies_https = proxies['https'] if proxies is not None else '无'
|
9 |
try:
|
10 |
response = requests.get("https://ipapi.co/json/", proxies=proxies, timeout=4)
|
11 |
data = response.json()
|
12 |
country = data['country_name']
|
13 |
# city = data['city']
|
|
|
14 |
result = f"代理配置 {proxies_https}, 代理所在地:{country}"
|
15 |
print(result)
|
16 |
return result
|