Showing
1 changed file
with
1 additions
and
2 deletions
| ... | @@ -72,12 +72,11 @@ async def get_xhs_cookie(account_file): | ... | @@ -72,12 +72,11 @@ async def get_xhs_cookie(account_file): |
| 72 | await page.goto("https://www.xiaohongshu.com") | 72 | await page.goto("https://www.xiaohongshu.com") |
| 73 | await asyncio.sleep(1) | 73 | await asyncio.sleep(1) |
| 74 | await page.wait_for_selector("div.link-wrapper a.link-wrapper span.channel", timeout=50000) | 74 | await page.wait_for_selector("div.link-wrapper a.link-wrapper span.channel", timeout=50000) |
| 75 | - print("小红书登录成功") | 75 | + xhs_logger.info("小红书登录成功") |
| 76 | await asyncio.sleep(3) | 76 | await asyncio.sleep(3) |
| 77 | 77 | ||
| 78 | # await page.pause() | 78 | # await page.pause() |
| 79 | # 点击调试器的继续,保存cookie | 79 | # 点击调试器的继续,保存cookie |
| 80 | - await asyncio.sleep(3) | ||
| 81 | cookies = await context.cookies() | 80 | cookies = await context.cookies() |
| 82 | await write_cookies_to_file(cookies, account_file) | 81 | await write_cookies_to_file(cookies, account_file) |
| 83 | 82 | ... | ... |
-
Please register or login to post a comment