discord-bot: real-Chrome fallback for bot-blocked web research
Add scripts/web-fetch-chrome.py — drives the installed Chrome 148 headlessly
via Playwright (channel="chrome", no Chromium download), runs JS, strips the
HeadlessChrome UA tell, isolated profile so it never touches a human's open
Chrome. Wire it into DISCORD_CLAUDE.md ("Web Research / Bot-Blocked Sites":
WebFetch first, real-Chrome fallback) and refine the headless rule to permit
headless fetching while still forbidding visible/interactive browser windows.
Add playwright to requirements.txt (no `playwright install` needed). Restarted bot.
Tested: static + JS-rendered pages render; UA reports Chrome/148 (not Headless).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,3 +11,8 @@ pydantic-settings>=2.5.2
|
||||
aiofiles>=23.2.1
|
||||
python-dotenv>=1.0.0
|
||||
structlog>=24.1.0
|
||||
|
||||
# Browser automation for bot-blocked web research (scripts/web-fetch-chrome.py).
|
||||
# Drives the system-installed Chrome via channel="chrome" — no `playwright install`
|
||||
# (no bundled Chromium download) needed.
|
||||
playwright>=1.60.0
|
||||
|
||||
Reference in New Issue
Block a user