From 414681fc0b9c24d6a39ca7d3e4bf8f5cb640a4ba Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sat, 11 Nov 2023 10:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=89=E8=A3=85=E9=87=8F?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Download.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Download.py b/Download.py index fb6da69..acf1d9a 100755 --- a/Download.py +++ b/Download.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +import os import sys +import json import base64 import requests print("""浣溪沙 @@ -8,4 +10,7 @@ print("""浣溪沙 print("") print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。") print("================================") -print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text) \ No newline at end of file +programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string +with open(f"{programPath}/information.json") as file: + version = json.loads(file.read())["Version"] +print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + version).text) \ No newline at end of file