ระบบอัตโนมัติเบราว์เซอร์แบบล่องหนสูงสุดด้วย Python — พร้อม MCP server และ skill สำหรับสร้างสคริปต์ ที่ให้ AI agent ของคุณ scrape เว็บที่ ป้องกันแน่นหนา ได้ ใช้ Chrome จริงพร้อม default profile, โหมด headful บน macOS, Xvfb บน Linux, และแก้ CDP leak ของ rebrowser-playwright
เลือกตามเว็บเป้าหมาย skill craft-scraper จะสร้างสคริปต์ที่ใช้ซ้ำได้จากเครื่องมือที่เหมาะสม — และใช้ Ultrastealth MCP เพื่อตัดสินใจว่าควรใช้ตัวไหน
ระบบอัตโนมัติ Chrome จริงแบบ headed พร้อม runner ที่ใช้ default profile แบบถาวร
ดึงข้อมูลผ่าน HTTP ล้วน ไม่ใช้เบราว์เซอร์ พร้อม TLS impersonation
__NEXT_DATA__)การตรวจจับถูกสู้ที่ระดับ driver, เบราว์เซอร์ และหน้าเพจ — ไม่ใช่แค่ปลอม user-agent
เปลี่ยนชื่อ identifier ที่รั่ว 4 ตัวของ rebrowser-playwright (__pwInitScripts, UtilityScript, __playwright_builtins__, __playwright__binding__) ที่ source ของ driver ทำคะแนนได้ 6/6 บน bot detector ของ rebrowser (0 fail; ข้าม 4 probe ที่เข้าถึงไม่ได้จาก isolated world โดยออกแบบไว้)
REBROWSER_PATCHES_RUNTIME_FIX_MODE=alwaysIsolated ทำให้ page.evaluate ไม่ทำงานใน main world → ตรวจไม่พบเลย บน probe ของ rebrowser
เปิด Chrome จริงแบบ headful บน macOS และผ่าน Xvfb บน Linux ด้วยชุด flag ที่คัดมาแล้ว — ไม่มีร่องรอย headless, ตัด flag automation ทิ้ง, navigator.webdriver:false
ไม่มีการปลอม canvas/WebGL/audio แบบ inject — ผลการวัดเปรียบเทียบแสดงว่า fingerprint ของ Chrome จริงที่ไม่แก้ไขเลยชนะแบบปลอมในทุกเว็บที่ทดสอบ
MCP เปิดการจับ network แบบ Chrome DevTools (browser_network_log/_detail/_response_body) — เหมาะกับการค้นหา JSON API
ให้ coding agent ของคุณมีเบราว์เซอร์ล่องหนที่สั่งงานได้ — เปิดหน้า คลิก พิมพ์ ถ่ายภาพหน้าจอ และจับ traffic เครือข่าย ทั้งหมดแบบกันการตรวจจับ
# ติดตั้ง ultrastealth + MCP server, Chromium fallback และ driver patch
curl -fsSL https://raw.githubusercontent.com/anusoft/ultrastealth/main/install.sh | bash
# รันซ้ำหลังอัปเกรด dependency เพื่อ install browser + patch อีกครั้ง
ultrastealth-install
ค่าเริ่มต้นคือ chrome+default-profile: ใช้ Google Chrome จริงกับ Chrome user-data root ของ OS และ --profile-directory=Default บน macOS จะเป็น Chrome แบบ headful ปกติ ส่วนโหมด headed บน Linux ต้องมี X server — sudo apt install xvfb แล้วรัน agent ผ่าน xvfb-run -a (หรือกำหนด DISPLAY) ถ้า Chrome เปิด default profile เดียวกันอยู่ ให้ปิด Chrome ก่อน หรือกำหนด ULTRASTEALTH_RUNNER=chrome+temp-profile / ULTRASTEALTH_USER_DATA_DIR=/path/to/profile ถ้าต้องการติดตั้งจาก repo clone ดู การติดตั้งแบบ clone ด้านล่าง
claude mcp add ultrastealth -- ultrastealth-mcp --transport stdio
.mcp.json (โปรเจกต์) / ~/.claude/settings.json (ทั้งระบบ){
"mcpServers": {
"ultrastealth": {
"command": "ultrastealth-mcp",
"args": ["--transport", "stdio"]
}
}
}
รีสตาร์ท แล้วพิมพ์ /mcp เพื่อยืนยันว่ามี tools ของ ultrastealth
~/.codex/config.toml[mcp_servers.ultrastealth]
command = "ultrastealth-mcp"
args = ["--transport", "stdio"]
codex mcp add ultrastealth -- ultrastealth-mcp --transport stdio
Codex ใช้ MCP แบบ stdio — คง --transport stdio ไว้
opencode.json (โปรเจกต์) หรือ ~/.config/opencode/opencode.json{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"ultrastealth": {
"type": "local",
"command": ["ultrastealth-mcp", "--transport", "stdio"],
"enabled": true
}
}
}
~/.cursor/mcp.json (ทั้งระบบ) หรือ .cursor/mcp.json (โปรเจกต์){
"mcpServers": {
"ultrastealth": {
"command": "ultrastealth-mcp",
"args": ["--transport", "stdio"]
}
}
}
เปิดใช้ที่ Settings → MCP แล้วเรียก tools จากแชท
รัน server ครั้งเดียวแล้วชี้ทุกเครื่องมือมาที่ URL แทนการเปิด process ใหม่ทุกครั้ง:
ultrastealth-mcp --port 8090 # เปิดที่ http://localhost:8090/mcp
claude mcp add --transport http ultrastealth http://localhost:8090/mcp{ "mcpServers": { "ultrastealth": { "url": "http://localhost:8090/mcp" } } }{ "mcp": { "ultrastealth": { "type": "remote", "url": "http://localhost:8090/mcp", "enabled": true } } }git clone https://github.com/anusoft/ultrastealth.git
cd ultrastealth
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
rebrowser_playwright install chromium
python3 -m ultrastealth.patch_rebrowser
จากนั้นใช้ "command": "python3", "args": ["-m","ultrastealth.mcp_server","--transport","stdio"] และตั้ง working directory (หรือ cwd ของ MCP) ไปที่โฟลเดอร์ที่ clone
craft-scraper รันลูปสร้างสคริปต์ด้วย LLM ครั้งเดียว แล้วได้สคริปต์ที่ ใช้ซ้ำได้และทำงานเหมือนเดิมทุกครั้ง รันซ้ำได้ตลอดโดยไม่ต้องใช้ LLM อีก มันใช้ MCP สำรวจเว็บ แล้วเขียนสคริปต์ scrapling-js (เร็ว สำหรับ API) หรือ Ultrastealth (สำหรับเว็บที่ป้องกัน/ใช้ JS) — เลือกให้อัตโนมัติ
# เครื่องมือ `skills` (vercel-labs/skills) จะตรวจจับ agent ของคุณ
# แล้วติดตั้งให้ถูกที่ — Claude Code, Codex, Cursor, OpenCode และอีกกว่า 70 ตัว
npx skills add anusoft/ultrastealth --skill craft-scraper
ตรวจจับ agent ที่ติดตั้งไว้อัตโนมัติ ถ้าหาไม่เจอจะถามให้เลือก รันในโปรเจกต์เพื่อติดตั้งระดับโปรเจกต์ หรือใส่ -g เพื่อติดตั้งทั้งระบบ (~/.claude/skills/ ฯลฯ) ผู้ใช้ Bun: bunx skills add … ก็ได้เหมือนกัน
npx skills add anusoft/ultrastealth --skill craft-scraper -g -y \
-a claude-code -a codex -a cursor -a opencode
หลังติดตั้งแล้ว แค่สั่งงานได้เลย — หรือพิมพ์ /craft-scraper <งาน + url> จัดการด้วย npx skills list / update / remove
skills CLI)git clone --depth 1 https://github.com/anusoft/ultrastealth.git /tmp/ultrastealth
mkdir -p ~/.claude/skills # หรือโฟลเดอร์ skills ของ agent คุณ
cp -r /tmp/ultrastealth/skills/craft-scraper ~/.claude/skills/
skill เป็น Markdown ล้วน (skills/craft-scraper/SKILL.md + reference/) จึงนำไปวางเป็น prompt/command/rule ของเครื่องมืออื่นได้เช่นกัน
สั่งครั้งเดียว ได้สคริปต์ที่รันซ้ำได้ตลอด
คุณ ▸ /craft-scraper ดึงสินค้าทั้งหมดจาก shop.example.com/catalog
Agent ▸ browser_network_enable() # MCP: เบราว์เซอร์ล่องหน
browser_navigate("…/catalog")
browser_network_log(filter_type="xhr")
→ พบ JSON API /api/products?page=N ✓ Path A (เร็ว)
↳ เขียน scrape_example.js (scrapling-js, ไม่ใช้เบราว์เซอร์ตอนรัน)
bun run scrape_example.js → 1,284 สินค้า ใน 13 หน้า ✓
# รันซ้ำเมื่อไรก็ได้ ไม่ต้องใช้ LLM:
bun run scrape_example.js --resume
ไม่มี API และมี Cloudflare ขวางอยู่? Agent จะสลับไป Path B แล้วสร้างสคริปต์ Python แบบ Ultrastealth headed แทน — skill เดิม คำสั่งเดิม สำหรับเว็บที่ติด Cloudflare Turnstile มันจะใส่ profile เบราว์เซอร์แบบถาวร + การแก้ challenge ให้ด้วย (และระบุว่าเว็บกลุ่มนี้ต้องใช้ IP แบบ residential) ดูตัวอย่างจริง examples/egp-announcements.py ใน repo
import asyncio
from ultrastealth import UltrastealthFetcher
async def main():
async with UltrastealthFetcher(headless=False) as us: # macOS headful; Linux ใช้ Xvfb
html = await us.fetch_and_evaluate(
url="https://bot.sannysoft.com/",
js_expression="() => document.documentElement.outerHTML",
wait_secs=3.0,
)
print(html[:500])
asyncio.run(main())