Xpersona
J

Js Render Scraper

CLAWHUB · Unverified

爬取需要 JavaScript 渲染的动态网页内容。当用户要求抓取 SPA、React/Vue 应用、无限滚动页面、需要登录的页面或任何依赖 JS 动态加载内容的网站时使用。支持使用 Playwright 进行浏览器自动化抓取。 Skill: Js Render Scraper Owner: plover061 Summary: 爬取需要 JavaScript 渲染的动态网页内容。当用户要求抓取 SPA、React/Vue 应用、无限滚动页面、需要登录的页面或任何依赖 JS 动态加载内容的网站时使用。支持使用 Playwright 进行浏览器自动化抓取。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-09T04:46:32.272Z | auto Initial release. - Introduces a JavaScript-rendered web scraper using Playwright for dynamic page extraction. - Supports scraping SPA, infinite-scroll, login-required, and Shado

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17e8ha9nx4bn4kp34p9x8nqts84hty2:js-render-scraper
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-plover061-js-render-scraper/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

9,998 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
AIGC:
    ContentProducer: Minimax Agent AI
    ContentPropagator: Minimax Agent AI
    Label: AIGC
    ProduceID: "00000000000000000000000000000000"
    PropagateID: "00000000000000000000000000000000"
    ReservedCode1: 3044022028523a0cb66b8d83293f741645ed990b8b53fbbcc4fdb5bfe1c3155c52a65ca602204f9d1cc18247d54fb3eee588805aad50197317528a5f99955b7bed7ff218faa1
    ReservedCode2: 3045022100b347e607d77b922f0aa9705ef58511fce84f7d231b705130af0cfe3c0eb28db3022043001c1760b6124edbda628200170db404f267f4ab49ff6965f1aaf1184c0587
description: 爬取需要 JavaScript 渲染的动态网页内容。当用户要求抓取 SPA、React/Vue 应用、无限滚动页面、需要登录的页面或任何依赖 JS 动态加载内容的网站时使用。支持使用 Playwright 进行浏览器自动化抓取。
name: js-render-scraper
---

# JS 渲染页面爬虫

使用 Playwright 浏览器自动化技术爬取 JavaScript 渲染的动态网页。

## 核心工作流程

### 1. 分析目标页面

在开始爬取前,分析页面特点:
- 识别页面是 SPA、SSR 还是客户端渲染
- 检查内容加载方式(滚动加载、点击加载、延迟加载等)
- 确定需要的交互操作(滚动、点击按钮、等待元素等)

### 2. 配置爬取参数

创建爬取配置:
```python
scraper_config = {
    "url": "目标URL",
    "wait_for_selector": "内容容器选择器",
    "scroll": True/False,           # 是否需要滚动加载
    "scroll_delay": 2000,            # 滚动间隔(毫秒)
    "max_scrolls": 10,               # 最大滚动次数
    "click_buttons": [],             # 需要点击的按钮选择器列表
    "wait_time": 3000,              # 初始等待时间
    "extract_method": "html"/"text"/"json"
}
```

### 3. 执行爬取

使用 Playwright 执行自动化爬取:

```python
from playwright.sync_api import sync_playwright

def scrape_js_page(config):
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        page = browser.new_page()

        # 访问页面
        page.goto(config["url"])

        # 等待页面加载
        page.wait_for_load_state("networkidle")
        page.wait_for_timeout(config.get("wait_time", 3000))

        # 处理滚动加载
        if config.get("scroll"):
            for _ in range(config.get("max_scrolls", 10)):
                page.evaluate("window.scrollTo(0, document.body.scrollHeight)")
                page.wait_for_timeout(config.get("scroll_delay", 2000))

        # 处理点击按钮
        for button_selector in config.get("click_buttons", []):
            try:
                page.click(button_selector)
                page.wait_for_timeout(1000)
            except:
                pass

        # 等待目标元素出现
        if config.get("wait_for_selector"):
            page.wait_for_selector(config["wait_for_selector"], timeout=10000)

        # 提取内容
        if config.get("extract_method") == "json":
            content = page.evaluate("() => JSON.stringify(window.__INITIAL_DATA__)")
        else:
            element = page.wait_for_selector(config["wait_for_selector"])
            content = element.inner_html() if config.get("extract_method") == "html" else element.inner_text()

        browser.close()
        return content
```

### 4. 内容解析与清洗

爬取原始 HTML 后,进行解析:

```python
from bs4 import BeautifulSoup

def parse_html_content(html_content):
    soup = BeautifulSoup(html_content, "html.parser")

    # 移除脚本和样式
    for tag in soup(["script", "style"]):
        tag.decompose()

    # 提取需要的数据
    data = {
       

_meta.json

{
  "ownerId": "kn7685rqm5nb3p6487ry2bnsr984ga84",
  "slug": "js-render-scraper",
  "version": "1.0.0",
  "publishedAt": 1775709992272
}

skill-card.md

## Description:

Js Render Scraper helps agents produce Playwright-based guidance and code for extracting content from JavaScript-rendered web pages, including SPAs, infinite-scroll pages, login-gated pages, and Shadow DOM content.

This skill is ready for commercial/non-commercial use.

## Publisher:

[plover061](https://clawhub.ai/user/plover061)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent users use this skill to plan and generate browser-automation scraping workflows for dynamic pages that require JavaScript execution, scrolling, waiting for selectors, clicking controls, login flows, or DOM parsing.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill includes guidance for logged-in scraping, which can expose real account credentials or session data.

Mitigation: Use only test credentials or controlled accounts, keep secrets out of prompts and generated files, and run scraping in a contained environment.

Risk: The skill discusses anti-bot, proxy, CAPTCHA, and stealth approaches that could be misused to bypass site controls.

Mitigation: Use the skill only for sites you are authorized to scrape, respect site terms and robots.txt, and do not use bypass guidance to evade access controls.

Risk: Browser automation can consume significant memory, network, and target-site resources.

Mitigation: Apply bounded timeouts, scroll limits, retry limits, and request delays before running generated scraping workflows.

## Reference(s):

- [scraper_example.py](artifact/references/scraper_example.py)
- [ClawHub skill page](https://clawhub.ai/plover061/skills/js-render-scraper)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown with Python code examples and structured JSON result examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Outputs may include Playwright scraper configuration, Python scraping functions, parsing guidance, and structured result schemas.]

## Skill Version(s):

1.0.0 (source: server release metadata and _meta.json)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Js Render Scraper and adjacent AI workflows.