(account_file, handle=False)
| 63 | |
| 64 | |
| 65 | async def weixin_setup(account_file, handle=False): |
| 66 | account_file = get_absolute_path(account_file, "tencent_uploader") |
| 67 | if not os.path.exists(account_file) or not await cookie_auth(account_file): |
| 68 | if not handle: |
| 69 | # Todo alert message |
| 70 | return False |
| 71 | print('[+] cookie文件不存在或已失效,即将自动打开浏览器,请扫码登录,登陆后会自动生成cookie文件') |
| 72 | # await save_storage_state(account_file) |
| 73 | os.system('python3 -m playwright install') |
| 74 | os.system(f'playwright codegen channels.weixin.qq.com --save-storage={account_file}') # 生成cookie文件 |
| 75 | return True |
| 76 | |
| 77 | |
| 78 | class TencentVideo(object): |
no test coverage detected