From a39618f7c10a135b8a73b81ee77e661128284bfc Mon Sep 17 00:00:00 2001 From: "pookz@stme" Date: Mon, 17 Jun 2024 11:43:11 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=8A=96=E9=9F=B3=E5=88=9B=E4=BD=9C?= =?UTF-8?q?=E8=80=85=E4=B8=AD=E5=BF=83=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douyin_uploader/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/douyin_uploader/main.py b/douyin_uploader/main.py index d1d3db2..38cb118 100644 --- a/douyin_uploader/main.py +++ b/douyin_uploader/main.py @@ -19,12 +19,12 @@ async def cookie_auth(account_file): page = await context.new_page() # 访问指定的 URL await page.goto("https://creator.douyin.com/creator-micro/content/upload") - try: - await page.wait_for_selector("div.boards-more h3:text('抖音排行榜')", timeout=5000) # 等待5秒 - douyin_logger.error(f'等待5秒 cookie 失效') + # 2024.06.17 抖音创作者中心改版 + if await page.get_by_text('手机号登录').count(): + print("[+] 等待5秒 cookie 失效") return False - except: - douyin_logger.success(f'cookie 有效') + else: + print("[+] cookie 有效") return True