MediaCrawler
MediaCrawler copied to clipboard
程序报错waiting for locator("//*[@id='app']/div[1]/div[2]/div[1]/ul/div[1]/button")
执行python main.py --platform xhs --lt qrcode --type search报错: E:\vscode\notes\notes\项目\MediaCrawler\MediaCrawler-main\MediaCrawler-main\main.py:68: DeprecationWarning: There is no current event loop asyncio.get_event_loop().run_until_complete(main()) 2024-04-15 21:16:47 MediaCrawler INFO [XiaoHongShuCrawler.launch_browser] Begin create browser context ... 2024-04-15 21:16:49 MediaCrawler INFO [XiaoHongShuCrawler.create_xhs_client] Begin create xiaohongshu API client ... 2024-04-15 21:16:49 MediaCrawler INFO [XiaoHongShuClient.pong] Begin to pong xhs... 2024-04-15 21:16:49 httpx INFO HTTP Request: POST https://edith.xiaohongshu.com/api/sns/web/v1/search/notes "HTTP/1.1 200 OK" 2024-04-15 21:16:49 MediaCrawler ERROR [XiaoHongShuClient.pong] Ping xhs failed: 您当前登录的账号没有权限访问, and try to login again... 2024-04-15 21:16:49 MediaCrawler INFO [XiaoHongShuLogin.begin] Begin login xiaohongshu ... 2024-04-15 21:16:49 MediaCrawler INFO [XiaoHongShuLogin.login_by_qrcode] Begin login xiaohongshu by qrcode ... Page.wait_for_selector: Timeout 30000ms exceeded. Call log: waiting for locator("//img[@class='qrcode-img']") to be visible
2024-04-15 21:17:19 MediaCrawler INFO [XiaoHongShuLogin.login_by_qrcode] login failed , have not found qrcode please check ....
Traceback (most recent call last):
File "E:\vscode\notes\notes\项目\MediaCrawler\MediaCrawler-main\MediaCrawler-main\main.py", line 68, in
删除下browser_data目录下对应的平台缓存文件,如下:xhs_user_data_dir,再测试
谢谢了,解决了