mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-14 02:52:03 +08:00
修改makefile
This commit is contained in:
@@ -7,32 +7,21 @@ with open("/var/lib/dpkg/status", "r") as i:
|
||||
if unConnect:
|
||||
print("52专版,将会无法连接服务器")
|
||||
|
||||
badUrl = [
|
||||
"http://120.25.153.144",
|
||||
"https://304626p927.goho.co",
|
||||
"https://30x46269h2.goho.co",
|
||||
"http://gfdgdxi.msns.cn"
|
||||
]
|
||||
|
||||
class Respon:
|
||||
text = ""
|
||||
|
||||
def get(url, timeout=None): # -> requests.Response:
|
||||
if unConnect:
|
||||
# 筛选 Url,只有特定的 url 才会被拦截
|
||||
for i in badUrl:
|
||||
if i in url:
|
||||
raise Exception("52专版不支持连接作者服务器")
|
||||
# 全部 Url 都拦截
|
||||
raise Exception("52专版不支持连接服务器")
|
||||
if timeout == None:
|
||||
return requests.get(url)
|
||||
return requests.get(url, timeout=timeout)
|
||||
|
||||
def post(url, data, timeout=None):
|
||||
if unConnect:
|
||||
# 筛选 Url,只有特定的 url 才会被拦截
|
||||
for i in badUrl:
|
||||
if i in url:
|
||||
raise Exception("52专版不支持连接作者服务器")
|
||||
# 全部 Url 都拦截
|
||||
raise Exception("52专版不支持连接服务器")
|
||||
if timeout == None:
|
||||
return requests.post(url, data)
|
||||
return requests.post(url, data, timeout=timeout)
|
||||
Reference in New Issue
Block a user