From 85895b5ae20cf5fce00861a1fab2467c3cbbba78 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 9 May 2023 22:36:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=A9=E4=BC=98=E9=80=89=E6=8B=A9=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- InstallNetFramework.py | 2 +- InstallOther.py | 15 ++++++++++++++- InstallVisualCPlusPlus.py | 11 ++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/InstallNetFramework.py b/InstallNetFramework.py index 4f9ce47..0216b2d 100755 --- a/InstallNetFramework.py +++ b/InstallNetFramework.py @@ -18,7 +18,7 @@ import req as requests try: sourcesList = [ "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/net/list.json", - "http://net.gfdgdxi.top/list.json", + "http://net.wine-runner.gfdgdxi.top/list.json", "http://gfdgdxi.msns.cn/wine-runner-list/net/list.json" ] change = False diff --git a/InstallOther.py b/InstallOther.py index 1e6f47d..a801880 100755 --- a/InstallOther.py +++ b/InstallOther.py @@ -17,11 +17,22 @@ import updatekiller import req as requests try: sourcesList = [ + "http://other.wine-runner.gfdgdxi.top/list.json", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/other/list.json", "http://gfdgdxi.msns.cn/wine-runner-list/other/list.json" ] - msxmlList = json.loads(requests.get(sourcesList[0]).text) + change = False + for i in sourcesList: + try: + msxmlList = json.loads(requests.get(i).text) + change = True + break + except: + pass + if not change: + msxmlList = json.loads(requests.get(sourcesList[0]).text) except: + print("使用离线列表") msxmlList = [ ["Windows Script 5.7 for Windows XP", "https://download.microsoft.com/download/f/f/e/ffea3abf-b55f-4924-b5a5-bde0805ad67c/scripten.exe", "exe", "scripten.exe"], ["Windows Management Instrumentation 1.50.1131", "https://www.gitlink.org.cn/api/attachments/390680", "exe", "WMITools.exe"] @@ -66,6 +77,8 @@ if __name__ == "__main__": while True: try: choose = input("请输入要选择要安装的应用(输入“exit”退出):").lower() + if choose == "exit": + break choose = int(choose) except: print("输入错误,请重新输入") diff --git a/InstallVisualCPlusPlus.py b/InstallVisualCPlusPlus.py index a029619..d4adf78 100755 --- a/InstallVisualCPlusPlus.py +++ b/InstallVisualCPlusPlus.py @@ -20,7 +20,16 @@ try: "http://vcpp.wine-runner.gfdgdxi.top/list.json", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vscpp/list.json" ] - netList = json.loads(requests.get(sourcesList[0]).text) + change = False + for i in sourcesList: + try: + netList = json.loads(requests.get(i).text) + change = True + break + except: + pass + if not change: + netList = json.loads(requests.get(sourcesList[0]).text) except: netList = [ ["VC6 运行库", "http://vcpp.wine-runner.gfdgdxi.top/VC6RedistSetup_deu.exe", "VC6RedistSetup_deu.exe"],