rm: all emoji

This commit is contained in:
ikun0014
2024-10-19 11:18:18 +08:00
parent df4342957f
commit 2a02d07e8d
12 changed files with 67 additions and 67 deletions

14
main.py
View File

@@ -22,11 +22,11 @@ repos = [
def prompt_app_id():
while True:
app_id = input(f"{Fore.CYAN}{Back.BLACK}{Style.BRIGHT}🤔 请输入游戏AppID: {Style.RESET_ALL}").strip()
app_id = input(f"{Fore.CYAN}{Back.BLACK}{Style.BRIGHT}请输入游戏AppID: {Style.RESET_ALL}").strip()
if re.match(r'^\d+$', app_id):
return app_id
else:
print(f"{Fore.RED}无效的AppID, 请输入数字!{Style.RESET_ALL}")
print(f"{Fore.RED}无效的AppID, 请输入数字!{Style.RESET_ALL}")
async def main_loop():
while True:
@@ -34,24 +34,24 @@ async def main_loop():
app_id = prompt_app_id()
await main(app_id, repos)
except KeyboardInterrupt:
log.info("\n👋 程序已退出")
log.info("程序已退出")
except EOFError:
break
async def run():
try:
log.info('App ID可以在SteamDB或Steam商店链接页面查看')
log.info('App ID可以在SteamDB或Steam商店链接页面查看')
await main_loop()
except KeyboardInterrupt:
log.info("\n👋 程序已退出")
log.info("程序已退出")
except Exception as e:
log.error(f'发生错误: {stack_error(e)}, 将在5秒后退出')
log.error(f'发生错误: {stack_error(e)}, 将在5秒后退出')
await asyncio.sleep(5)
if __name__ == '__main__':
try:
asyncio.run(run())
except KeyboardInterrupt:
log.info("\n👋 程序已退出")
log.info("程序已退出")
except SystemExit:
sys.exit()