test-driven-development
OBobra/superpowers298k近 7 天新增 2,631 个 star
Extracts data from web pages using browser automation and CSS/JavaScript selectors. Use when you need to scrape titles/text/structured fields from live web pages or when the user mentions scraping, extraction, or selectors.
Extract data from web pages using JavaScript and CSS selectors. This skill uses real browser automation to navigate to pages and extract content using JavaScript execution. It can extract webpage titles using document.title and body text using document.body.textContent, providing actual content from live web pages.
None
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | String | Yes | - | The URL of the web page to scrape |
| selector | String | Yes | - | CSS selector to target specific elements |
| attributes | List | No | ["text"] | List of attributes to extract (e.g., "text", "href", "src") |
Returns a SkillResult with the following data structure:
{
"url": "string",
"selector": "string",
"attributes": ["string"],
"data": "extracted content"
}
val result = registry.execute(
skillId = "web-scraping",
context = context,
params = mapOf(
"url" to "https://example.com",
"selector" to ".content"
)
)
val result = registry.execute(
skillId = "web-scraping",
context = context,
params = mapOf(
"url" to "https://example.com/products",
"selector" to "a.product-link",
"attributes" to listOf("text", "href")
)
)
ToolSpec(
domain = "skill.debug.scraping",
method = "extract",
arguments = [
"url: String",
"selector: String",
"attributes: List<String> = listOf('text')"
],
returnType = "Map<String, Any>",
description = "Extract data from a web page using CSS selectors"
)
The skill returns a failure result in the following cases:
urlselectorInitializes resources and loads configurations when the skill is registered.
Validates URL format before execution. Returns false if URL doesn't start with http:// or https://.
Records the timestamp of successful scraping operations in shared resources.
Validates skill configuration and environment. Always returns true for this skill.
close, then open --headed <url> with the same session and retry once, telling the user that anti-bot protection forced the switch. If the headed retry is blocked too, stop and report instead of looping.document.titledocument.body.textContentOBobra/superpowers298k近 7 天新增 2,631 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star
FIfirecrawl/firecrawl191k近 7 天新增 2,010 个 star