تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

playwright-npx

بواسطة mahone-bot

Web & Frontend Development
937التنزيلات وفق ما يذكره clawskills.sh
0المشاهدات
لا إعجاباتسجّل الدخول للإعجاب بهذه المهارة
—لم يُقيَّم بعد
تقييمك

موجز

Fast browser automation using Node.js scripts with Playwright (run via `node script.mjs`)

الوصف

ما الذي تفعله هذه المهارة

Browser automation skill using Playwright and Node.js scripts. Handles JavaScript-heavy sites, form interactions, screenshots, and data scraping. Run scripts directly with `node script.mjs`.

Gives full programmatic control over browser behavior for complex sites where simple HTTP fetching fails due to JavaScript rendering or dynamic content.

متى تستخدمها

  • Scraping data from JavaScript-rendered pages
  • Taking full-page screenshots of websites
  • Automating login and form submission flows
  • Extracting structured data from news or listing sites
  • Maintaining persistent browser sessions across runs

مثال على سير العمل

الإدخال

User asks: scrape the top 5 stories from Hacker News

الوكيل
  1. 1

    Create a script in tmp/ using the scrape template

  2. 2

    Launch a headless Chromium browser with Playwright

  3. 3

    Navigate to news.ycombinator.com

  4. 4

    Extract story titles and URLs using page.$$eval on .titleline > a

  5. 5

    Log results as JSON and close the browser

الإخراج

A JSON array of 5 objects each with title and url fields printed to stdout

التثبيت

clawhub install mahone-bot/playwright-npx

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط