bug-ops/zeph/web-scrape

Claude Code and agent skill by bug-ops/zeph

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Extract structured data from web pages using CSS selectors. Use when the user asks to scrape a website, extract text or links from a page, parse HTML content, get data from a table, read article content, collect image URLs, or pull structured information from any web page. Keywords: scrape, extract, parse, crawl, get page content, read website, pull data, HTML.

Install

npx vskill@latest install bug-ops/zeph/web-scrape

SKILL.md

Web Page Data Extraction

Extract structured data from web pages by specifying a URL, a CSS selector to target elements, and an extraction mode.

Command Format

`scrape
{"url": "URL", "select": "CSS_SELECTOR", "extract": "MODE", "limit": N}
Parameters
ParameterRequiredDescription
urlYesFull URL of the page (use HTTPS)
selectYesCSS selector to target elements
extractNoExtraction mode: text (default), html, or attr:NAME
limitNoMaximum number of elements to return
Extract Modes
ModeDescriptionExample Output
textInner text content, stripped of HTML tagsHello World
htmlInner HTML markup<strong>Hello</strong> World
attr:hrefValue of the specified attributehttps://example.com
attr:srcValue of the src attribute/images/logo.png
attr:classValue of the class attributebtn btn-primary
attr:idValue of the id attributemain-content
attr:data-*Value of any data attribute42

CSS Selector Reference

Basic Selectors
SelectorDescriptionExample
elementAll elements of that typep, div, h1, table
.classElements with a specific class.article, .btn-primary
#idElement with a specific ID#content, #main
*All elements*
element.classElement with a specific classdiv.container, p.intro
element#idElement with a specific IDdiv#header
Attribute Selectors
SelectorDescriptionExample
[attr]Has the attribute[href], [data-id]
[attr=val]Attribute equals value exactly[type="text"], [lang="en"]
[attr~=val]Attribute contains word (space-separated)[class~="active"]
`[attr\=val]`Attribute starts with value or value followed by -`[lang\="en"]`
[attr^=val]Attribute starts with value[href^="https"]
[attr$=val]Attribute ends with value[href$=".pdf"]
[attr*=val]Attribute contains value anywhere[href*="example"]
Combinators
SelectorDescriptionExample
A BB is a descendant of A (any depth)article p
A > BB is a direct child of Aul > li
A + BB is the immediate next sibling of Ah2 + p
A ~ BB is any subsequent sibling of Ah2 ~ p
A, BEither A or B (selector list)h1, h2, h3
Pseudo-Classes
SelectorDescriptionExample
:first-childFirst child of its parentli:first-child
:last-childLast child of its parentli:last-child
:nth-child(n)Nth child (1-based)tr:nth-child(2)
:nth-child(odd)Odd-numbered childrentr:nth-child(odd)
:nth-child(even)Even-numbered childrentr:nth-child(even)
:nth-of-type(n)Nth element of its typep:nth-of-type(3)
:first-of-typeFirst element of its typep:first-of-type
:last-of-typeLast element of its typep:last-of-type
:not(sel)Elements that do not matchp:not(.ad)
:emptyElements with no childrentd:empty

Common Extraction Patterns

Page Title
scrape
{"url": "https://example.com", "select": "title", "extract": "text"}
Meta Description
scrape
{"url": "https://example.com", "select": "meta[name='description']", "extract": "attr:content"}
Open Graph Tags
scrape
{"url": "https://example.com", "select": "meta[property^='og:']", "extract": "attr:content"}
All Links on a Page
scrape
{"url": "https://example.com", "select": "a[href]", "extract": "attr:href", "limit": 50}
External Links Only
scrape
{"url": "https://example.com", "select": "a[href^='http']", "extract": "attr:href", "limit": 30}
All Images
scrape
{"url": "https://example.com", "select": "img", "extract": "attr:src", "limit": 20}
Images with Alt Text
scrape
{"url": "https://example.com", "select": "img[alt]", "extract": "attr:alt", "limit": 20}
Article / Main Content
scrape
{"url": "https://example.com/post", "select": "article p", "extract": "text"}
scrape
{"url": "https://example.com/post", "select": "main p", "extract": "text"}
scrape
{"url": "https://example.com/post", "select": ".content p, .post-body p", "extract": "text"}
Headings (Document Structure)
scrape
{"url": "https://example.com/post", "select": "h1, h2, h3", "extract": "text"}
Navigation Links
scrape
{"url": "https://example.com", "select": "nav a", "extract": "text", "limit": 20}
Table Data
scrape
{"url": "https://example.com/data", "select": "table thead th", "extract": "text"}
scrape
{"url": "https://example.com/data", "select": "table tbody td", "extract": "text", "limit": 100}
scrape
{"url": "https://example.com/data", "select": "table tbody tr", "extract": "text", "limit": 50}
Ordered / Unordered Lists
scrape
{"url": "https://example.com", "select": "ul.features li", "extract": "text"}
scrape
{"url": "https://example.com", "select": "ol li", "extract": "text"}
Definition Lists
scrape
{"url": "https://example.com", "select": "dl dt", "extract": "text"}
scrape
{"url": "https://example.com", "select": "dl dd", "extract": "text"}
Form Fields
scrape
{"url": "https://example.com/form", "select": "input[type='text'], input[type='email'], textarea", "extract": "attr:name"}
Code Blocks
scrape
{"url": "https://example.com/docs", "select": "pre code", "extract": "text", "limit": 10}
Specific Data Attributes
scrape
{"url": "https://example.com", "select": "[data-price]", "extract": "attr:data-price"}

Multi-Step Extraction Strategy

For complex pages, extract data in multiple steps:

  1. Discover structure — get headings and landmark elements first:

``scrape {"url": "https://example.com", "select": "h1, h2, h3, nav, main, article, section", "extract": "text", "limit": 30} ``

  1. Narrow down — once you know the page structure, target the specific container:

``scrape {"url": "https://example.com", "select": "#results .item .title", "extract": "text"} ``

  1. Extract details — get attributes or nested content from the targeted elements:

``scrape {"url": "https://example.com", "select": "#results .item a", "extract": "attr:href"} ``

Selector Construction Tips

Finding the Right Selector
  • Start broad (p, div, a) and narrow down based on results
  • Use class names when available — they are the most reliable selectors
  • Combine element + class for precision: div.product-card instead of .product-card
  • Use attribute selectors for pages that rely on data attributes: [data-testid="price"]
  • Chain selectors for nested content: div.product-card > h3 > a
Common Page Structures
Content TypeLikely Selectors
Article bodyarticle p, main p, .content p, .post-body p
Blog post titleh1, article h1, .post-title
Product name.product-name, .product-title, h1.title
Product price.price, .product-price, [data-price], span.amount
Search results.result, .search-result, .item
Navigationnav a, .nav-link, .menu a
Sidebaraside, .sidebar, #sidebar
Footerfooter, .footer, #footer
Breadcrumbs.breadcrumb a, nav[aria-label="breadcrumb"] a

Pagination

To scrape multiple pages, modify the URL for each page:

scrape
{"url": "https://example.com/items?page=1", "select": ".item-title", "extract": "text", "limit": 25}
scrape
{"url": "https://example.com/items?page=2", "select": ".item-title", "extract": "text", "limit": 25}

Look for pagination patterns in the page:

scrape
{"url": "https://example.com/items", "select": ".pagination a", "extract": "attr:href"}

Important Notes

  • Always use HTTPS URLs when possible
  • Set a reasonable limit to avoid overwhelming output — start with 10-20 and increase if needed
  • If a selector returns no results, the page may use JavaScript rendering (SPA). Try broader selectors or a different approach
  • Some sites block automated access — if a request fails, the site may require authentication or have anti-scraping measures
  • Respect robots.txt and site terms of service
  • For tables, extract headers (thead th) and data (tbody td) separately for cleaner results
  • When extracting links with attr:href, relative URLs (starting with /) need the base domain prepended
  • Use extract: "html" when you need to preserve formatting (bold, links, lists) within elements
  • If the initial selector is too broad and returns noise, add parent context: instead of p, try article p or main p
  • For sites with dynamic class names (React/Next.js), use attribute selectors: [data-testid="..."], [role="..."], [aria-label="..."]

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
65
Repository forks
7
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bug-ops/zeph/web-scrape/badge)](https://verified-skill.com/skills/bug-ops/zeph/web-scrape)

Something wrong with this skill or its page? Tell us.