- name
SKILL.md
ไฟล์สกิลยังคงอยู่ในรีโพซิทอรีของผู้เผยแพร่
วางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add omagents/omagents --skill playwright-web-scraping -a cursor -yวางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add omagents/omagents --skill playwright-web-scraping -a claude-code -yวางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add omagents/omagents --skill playwright-web-scraping -a codex -yวางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add omagents/omagents --skill playwright-web-scraping -a grok -yส่งข้อความที่คัดลอกไว้ในแชต Grok Bot แล้ว Bot จะดึง SKILL.md นี้จาก GitHub และเพิ่มลงในสกิลที่ Bot ทุกตัวของคุณใช้ร่วมกัน
Install this skill: https://github.com/omagents/omagents/tree/HEAD/packages/core/skills/playwright-web-scrapingจากผู้เผยแพร่
curl directly)curl)wget or curl -O)Run the bundled script to fetch page content as clean text:
python scripts/fetch_page.py <URL>
Options:
--format text (default): output clean readable text--format html: output raw HTML--format markdown: output as Markdown--wait <seconds>: extra wait time for dynamic content (default: 3)--screenshot <path>: save a screenshot before extracting content--selector <css>: extract only content matching the CSS selectorWhen the bundled script is insufficient, write inline Python with Playwright:
import asyncio
from playwright.async_api import async_playwright
async def scrape(url):
async with async_playwright() as p:
browser = await p.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto(url, wait_until="networkidle")
# Extract what you need
content = await page.content() # full HTML
text = await page.inner_text("body") # visible text
title = await page.title()
await browser.close()
return {"title": title, "text": text}
result = asyncio.run(scrape("https://example.com"))
print(result["text"][:2000])
await page.wait_for_selector("div.content", timeout=15000)
for _ in range(5):
await page.evaluate("window.scrollTo(0, document.body.scrollHeight)")
await page.wait_for_timeout(2000)
await page.fill("input[name='q']", "search term")
await page.click("button[type='submit']")
await page.wait_for_load_state("networkidle")
items = await page.query_selector_all("div.item")
for item in items:
name = await item.inner_text()
print(name)
Playwright runs in the omagents Python venv (see agents-python-tools skill for setup and cross-platform paths):
Check the Python package and Chromium separately through the base interpreter:
~/.venvs/omagents/bin/python -c "from playwright.async_api import async_playwright" 2>/dev/null && echo "OK" || echo "NEED_INSTALL"
~/.venvs/omagents/bin/python -c "from pathlib import Path; from playwright.sync_api import sync_playwright; p=sync_playwright().start(); executable=p.chromium.executable_path; p.stop(); print('OK' if Path(executable).exists() else 'NEED_INSTALL')"
Run only the installation step whose check reports NEED_INSTALL:
~/.venvs/omagents/bin/python -m pip install playwright
~/.venvs/omagents/bin/python -m playwright install chromium
>
---name: playwright-web-scrapingdescription: >---# packages/core/skills/playwright-web-scraping/SKILL.mdFAQ
ดาวน์โหลด packages/core/skills/playwright-web-scraping/SKILL.md จากผู้เผยแพร่ หรือคัดลอกพาธแล้วเปิดรีโพซิทอรี PlugMCP แสดงรายการสกิลเท่านั้น ไม่ได้โฮสต์ไฟล์
ผู้เผยแพร่เก็บไว้ที่ https://github.com/omagents/omagents
Claude, Cursor, Codex และ Grok Build อ่าน SKILL.md ที่คุณเพิ่มจากรีโพซิทอรีของผู้เผยแพร่ได้ ส่วน Grok Bot จะติดตั้งให้เมื่อคุณส่งลิงก์โฟลเดอร์ GitHub ของสกิลในแชต