Skip to main content

Pry Templates ๐ŸŸก Beta

Templates are reusable extraction blueprints: selectors + post-processing for a site class (news articles, product pages, forum threads).

# templates/news-article.yaml
name: news-article
version: 3
extract:
title: "h1::text"
body: "article::html"
author: "[rel=author]::text"
published: "time[datetime]::attr(datetime)"
post:
body: markdown
strip: [nav, aside, .ads]

Using templatesโ€‹

curl -X POST :8080/v1/scrape \
-d '{"url":"https://news.example.com/story","template":"news-article"}'

Built-in templatesโ€‹

TemplateTargetsStatus
news-articleEditorial pages๐ŸŸข
product-pageE-commerce PDPs๐ŸŸก
threadForum/social threads๐ŸŸก

Contribute templates via PR โ€” each needs 3+ fixture-tested target domains.