Browse Source

fix: 文心一言支持返回旧版按钮

master
zzx 3 months ago
parent
commit
05c69b66ca
  1. 4
      spiders/ai_seo/yiyan.py

4
spiders/ai_seo/yiyan.py

@ -172,6 +172,10 @@ class YiYanSpider(AbstractAiSeoSpider):
async def check_login(self):
# 找登录后才会出现的侧边栏
try:
old_btn = self.browser_page.locator("//div[text()='返回旧版']")
if await old_btn.is_visible():
await old_btn.click()
await asyncio.sleep(3)
await self.browser_page.locator("//div[@id='eb_sidebar']").wait_for(state='attached', timeout=20000)
except Exception:
# 更新session状态

Loading…
Cancel
Save