新增存储到mongoDB

This commit is contained in:
yt210
2025-11-06 10:40:30 +08:00
parent ed6e0bfb5f
commit ef6948b305
25 changed files with 1367 additions and 665 deletions

View File

@@ -497,11 +497,12 @@ class BilibiliCrawler(AbstractCrawler):
"height": 1080
},
user_agent=user_agent,
channel="chrome", # 使用系统的Chrome稳定版
)
return browser_context
else:
# type: ignore
browser = await chromium.launch(headless=headless, proxy=playwright_proxy)
browser = await chromium.launch(headless=headless, proxy=playwright_proxy, channel="chrome")
browser_context = await browser.new_context(viewport={"width": 1920, "height": 1080}, user_agent=user_agent)
return browser_context