mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-17 18:30:43 +08:00
简化代码
This commit is contained in:
parent
5865885e6a
commit
1ea62c5d0a
@ -767,12 +767,8 @@ def main():
|
|||||||
print(f"===============程序开始===============")
|
print(f"===============程序开始===============")
|
||||||
print(f"⏰ 执行时间: {start_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
print(f"⏰ 执行时间: {start_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||||
print()
|
print()
|
||||||
# 启动参数
|
# 读取启动参数
|
||||||
arguments = sys.argv
|
config_path = sys.argv[1] if len(sys.argv) > 1 else "quark_config.json"
|
||||||
if len(arguments) > 1:
|
|
||||||
config_path = arguments[1]
|
|
||||||
else:
|
|
||||||
config_path = "quark_config.json"
|
|
||||||
# 检查本地文件是否存在,如果不存在就下载
|
# 检查本地文件是否存在,如果不存在就下载
|
||||||
if not os.path.exists(config_path):
|
if not os.path.exists(config_path):
|
||||||
if os.environ.get("QUARK_COOKIE"):
|
if os.environ.get("QUARK_COOKIE"):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user