Files
Onekey/main.py
WangXianming 6f4dac876f 优化代码
2024-09-16 15:06:13 +08:00

32 lines
766 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import os
import time
import asyncio
from common.log import log
from common.stack_error import stack_error
from common.init_text import init
from common.main_func import main
lock = asyncio.Lock()
init()
repos = [
'ikun0014/ManifestHub',
'Auiowu/ManifestAutoUpdate',
'tymolu233/ManifestAutoUpdate'
]
def get_app_id():
log.info('App ID可以在SteamDB或Steam商店链接页面查看')
return input("请输入游戏AppID").strip()
if __name__ == '__main__':
try:
while True:
app_id = get_app_id()
asyncio.run(main(app_id, repos))
except KeyboardInterrupt:
exit()
except Exception as e:
log.error(f' ⚠ 发生错误: {stack_error(e)}将在5秒后退出')
time.sleep(5)