Skip to content

Commit

Permalink
版本推进至 3.0.11
Browse files Browse the repository at this point in the history
+ 支持代理
  • Loading branch information
lunzhiPenxil committed Oct 6, 2022
1 parent 982968e commit 5b29b42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions OlivaDiceMaster/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"namespace" : "OlivaDiceMaster",
"message_mode" : "old_string",
"info" : "本模块为OlivaDice的大师模块,提供了更高级的骰主管理功能,其中的功能可能不是必须的,但是却是强大的,这些功能包括但不限于更新和安装新的模块。",
"version" : "3.0.10",
"svn" : 11,
"version" : "3.0.11",
"svn" : 12,
"compatible_svn" : 101,
"priority" : 20020,
"support" : [
Expand Down
4 changes: 2 additions & 2 deletions OlivaDiceMaster/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
'''


OlivaDiceMaster_ver = '3.0.10'
OlivaDiceMaster_svn = 11
OlivaDiceMaster_ver = '3.0.11'
OlivaDiceMaster_svn = 12
OlivaDiceMaster_ver_short = '%s(%s)' % (str(OlivaDiceMaster_ver), str(OlivaDiceMaster_svn))

OlivaDiceMaster_oopm_host = 'https://api.dice.center/OlivaDiceVer'
Expand Down
5 changes: 3 additions & 2 deletions OlivaDiceMaster/webTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@Desc : None
'''

import OlivaDiceCore
import OlivaDiceMaster

import requests as req
Expand All @@ -31,7 +32,7 @@ def GETHttpJson2Dict(url):
'User-Agent': 'OlivaDiceMaster/%s' % OlivaDiceMaster.data.OlivaDiceMaster_ver_short
}
try:
msg_res = req.request("GET", send_url, headers = headers, timeout = 60)
msg_res = req.request("GET", send_url, headers = headers, timeout = 60, proxies = OlivaDiceCore.webTool.get_system_proxy())
res = json.loads(msg_res.text)
except:
pass
Expand All @@ -44,7 +45,7 @@ def GETHttpFile(url, path):
'User-Agent': 'OlivaDiceMaster/%s' % OlivaDiceMaster.data.OlivaDiceMaster_ver_short
}
try:
msg_res = req.request("GET", send_url, headers = headers)
msg_res = req.request("GET", send_url, headers = headers, proxies = OlivaDiceCore.webTool.get_system_proxy())
releaseToDirForFile(path)
with open(path, 'wb+') as tmp:
tmp.write(msg_res.content)
Expand Down

0 comments on commit 5b29b42

Please sign in to comment.