docs: apply fleet-template (16-artifact scaffold)
Adds missing standard artifacts: - README.md (if missing) - AGENTS.md (AI agent contract) - PLAN.md (current sprint) - STATUS.md (where we are) - DEVELOPMENT.md (dev workflow) - DEPLOYMENT.md (deploy procedure) - TESTING.md (test strategy) - DECISIONS.md (ADR index + templates) - .github/CODEOWNERS - .github/workflows/ci.yml Preserves all existing artifacts. Refs: RugMunchMedia/fleet-template
This commit is contained in:
commit
47ba268131
310 changed files with 38429 additions and 0 deletions
41
templates/abcnews-article.json
Normal file
41
templates/abcnews-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "ABC News Article",
|
||||
"description": "Extract article content from ABC News",
|
||||
"site": "abcnews.go.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "abc_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [class*='timestamp']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.abcnews.go.com/*"
|
||||
}
|
||||
51
templates/adidas-product.json
Normal file
51
templates/adidas-product.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "Adidas Product",
|
||||
"description": "Extract product details from Adidas",
|
||||
"site": "adidas.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc5f",
|
||||
"schema": {
|
||||
"name": "adidas_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "sport",
|
||||
"selector": "[class*='sport']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.adidas.com/*"
|
||||
}
|
||||
21
templates/airbnb-listing.json
Normal file
21
templates/airbnb-listing.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Airbnb Listing",
|
||||
"description": "Extract listing details from Airbnb",
|
||||
"site": "airbnb.com",
|
||||
"category": "travel",
|
||||
"icon": "🏠",
|
||||
"url_pattern": "*://www.airbnb.com/rooms/*",
|
||||
"schema": {
|
||||
"name": "airbnb_listing",
|
||||
"base_selector": "[data-section-id='TITLE_DEFAULT']",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1", "type": "text"},
|
||||
{"name": "price_per_night", "selector": "[data-testid='price-availability-row']", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": "[data-testid='review-summary']", "type": "text", "transform": "float"},
|
||||
{"name": "review_count", "selector": "[data-testid='review-count']", "type": "text", "transform": "int"},
|
||||
{"name": "location", "selector": "[data-testid='location']", "type": "text"},
|
||||
{"name": "host_name", "selector": "[data-testid='host-name']", "type": "text"},
|
||||
{"name": "description", "selector": "[data-section-id='DESCRIPTION_DEFAULT']", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
47
templates/aliexpress-product.json
Normal file
47
templates/aliexpress-product.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "AliExpress Product",
|
||||
"description": "Extract product details from AliExpress",
|
||||
"site": "aliexpress.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udce6",
|
||||
"schema": {
|
||||
"name": "aliexpress_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": ".product-price-current",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "orders",
|
||||
"selector": ".product-reviewer",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": ".star-wrap",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": ".product-description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".gallery-main img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.aliexpress.com/*"
|
||||
}
|
||||
46
templates/aljazeera-article.json
Normal file
46
templates/aljazeera-article.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "Al Jazeera Article",
|
||||
"description": "Extract article content from Al Jazeera",
|
||||
"site": "aljazeera.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "aj_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [class*='date']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "section",
|
||||
"selector": "[class*='section'] a",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.aljazeera.com/*"
|
||||
}
|
||||
24
templates/amazon-product.json
Normal file
24
templates/amazon-product.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "Amazon Product",
|
||||
"description": "Extract product details from Amazon product pages",
|
||||
"site": "amazon.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🛒",
|
||||
"url_pattern": "*://www.amazon.com/*/dp/*",
|
||||
"schema": {
|
||||
"name": "amazon_product",
|
||||
"base_selector": "#dp-container",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "#productTitle", "type": "text"},
|
||||
{"name": "price", "selector": ".a-price .a-offscreen", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": "#acrPopover .a-icon-alt", "type": "text", "transform": "float"},
|
||||
{"name": "review_count", "selector": "#acrCustomerReviewText", "type": "text", "transform": "int"},
|
||||
{"name": "brand", "selector": "#bylineInfo", "type": "text"},
|
||||
{"name": "availability", "selector": "#availability span", "type": "text"},
|
||||
{"name": "description", "selector": "#productDescription", "type": "text"},
|
||||
{"name": "bullet_points", "selector": "#feature-bullets li", "type": "text"},
|
||||
{"name": "image_url", "selector": "#landingImage", "type": "attribute", "attribute": "src"},
|
||||
{"name": "asin", "selector": "", "type": "regex", "pattern": "/dp/([A-Z0-9]{10})"}
|
||||
]
|
||||
}
|
||||
}
|
||||
21
templates/amazon-search.json
Normal file
21
templates/amazon-search.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Amazon Search Results",
|
||||
"description": "Extract product listings from Amazon search results pages",
|
||||
"site": "amazon.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🔍",
|
||||
"url_pattern": "*://www.amazon.com/s?*",
|
||||
"schema": {
|
||||
"name": "amazon_search",
|
||||
"base_selector": "[data-component-type='s-search-result']",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h2 a span", "type": "text"},
|
||||
{"name": "price", "selector": ".a-price .a-offscreen", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": ".a-icon-alt", "type": "text", "transform": "float"},
|
||||
{"name": "review_count", "selector": ".a-size-base.s-underline-text", "type": "text", "transform": "int"},
|
||||
{"name": "url", "selector": "h2 a", "type": "attribute", "attribute": "href"},
|
||||
{"name": "image_url", "selector": ".s-image", "type": "attribute", "attribute": "src"},
|
||||
{"name": "is_prime", "selector": ".s-prime", "type": "exists"}
|
||||
]
|
||||
}
|
||||
}
|
||||
41
templates/arstechnica-article.json
Normal file
41
templates/arstechnica-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Ars Technica Article",
|
||||
"description": "Extract article content from Ars Technica",
|
||||
"site": "arstechnica.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "ars_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author'] a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.arstechnica.com/*"
|
||||
}
|
||||
69
templates/asos-product.json
Normal file
69
templates/asos-product.json
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
"name": "ASOS Product",
|
||||
"description": "Extract product details from ASOS",
|
||||
"site": "asos.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc57",
|
||||
"schema": {
|
||||
"name": "asos_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original'], [class*='was']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color'], [class*='colour']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.asos.com/*"
|
||||
}
|
||||
41
templates/associated-press-article.json
Normal file
41
templates/associated-press-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "AP News Article",
|
||||
"description": "Extract article content from Associated Press",
|
||||
"site": "apnews.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "ap_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='Author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [class*='timestamp']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='Article']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.apnews.com/*"
|
||||
}
|
||||
41
templates/axios-article.json
Normal file
41
templates/axios-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Axios Article",
|
||||
"description": "Extract article content from Axios",
|
||||
"site": "axios.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "axios_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.axios.com/*"
|
||||
}
|
||||
51
templates/bbc-article.json
Normal file
51
templates/bbc-article.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "BBC News Article",
|
||||
"description": "Extract article content from BBC News",
|
||||
"site": "bbc.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "bbc_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[data-component='byline-block']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [data-testid='timestamp']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[data-component='text-block']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"selector": "[data-component='lead-block']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "section",
|
||||
"selector": "[data-component='topic-tags'] a",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.bbc.com/*"
|
||||
}
|
||||
22
templates/bestbuy-product.json
Normal file
22
templates/bestbuy-product.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "Best Buy Product",
|
||||
"description": "Extract product details from Best Buy product pages",
|
||||
"site": "bestbuy.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🔵",
|
||||
"url_pattern": "*://www.bestbuy.com/site/*",
|
||||
"schema": {
|
||||
"name": "bestbuy_product",
|
||||
"base_selector": ".shop-product-details",
|
||||
"fields": [
|
||||
{"name": "title", "selector": ".sku-title h1", "type": "text"},
|
||||
{"name": "price", "selector": ".priceView-customer-price span", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": ".rating-reviews", "type": "text", "transform": "float"},
|
||||
{"name": "review_count", "selector": ".rating-reviews span", "type": "text", "transform": "int"},
|
||||
{"name": "model", "selector": ".sku-model", "type": "text"},
|
||||
{"name": "description", "selector": ".product-description", "type": "text"},
|
||||
{"name": "image_url", "selector": ".primary-image img", "type": "attribute", "attribute": "src"},
|
||||
{"name": "availability", "selector": ".fulfillment-add-to-cart-button", "type": "exists"}
|
||||
]
|
||||
}
|
||||
}
|
||||
68
templates/bhphotovideo-product.json
Normal file
68
templates/bhphotovideo-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "B&H Photo Product",
|
||||
"description": "Extract product details from B&H Photo Video",
|
||||
"site": "bhphotovideo.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udcf7",
|
||||
"schema": {
|
||||
"name": "bh_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "model",
|
||||
"selector": "[class*='model'], [itemprop='model']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"selector": "[class*='sku'], [itemprop='sku']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "stock",
|
||||
"selector": "[class*='stock']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "specs",
|
||||
"selector": "[class*='specs'], [class*='specifications']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.bhphotovideo.com/*"
|
||||
}
|
||||
40
templates/bloomberg-article.json
Normal file
40
templates/bloomberg-article.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "Bloomberg Article",
|
||||
"description": "Extract article content from Bloomberg",
|
||||
"site": "bloomberg.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "bloomberg_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": ".body-content",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"selector": "[class*='lede-text']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.bloomberg.com/*"
|
||||
}
|
||||
53
templates/booking-hotel.json
Normal file
53
templates/booking-hotel.json
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "Booking.com Hotel",
|
||||
"description": "Extract hotel details from Booking.com",
|
||||
"site": "booking.com",
|
||||
"category": "travel",
|
||||
"icon": "\ud83c\udfe8",
|
||||
"schema": {
|
||||
"name": "booking_hotel",
|
||||
"base_selector": ".page-wrapper",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": "h2",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": ".review-score-badge",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": ".review-score-widget",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "price_per_night",
|
||||
"selector": ".prco-valign-middle-helper",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"selector": ".hp_address_subtitle",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "#property_description_content",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".hotel_image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.booking.com/*"
|
||||
}
|
||||
41
templates/businessinsider-article.json
Normal file
41
templates/businessinsider-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Business Insider Article",
|
||||
"description": "Extract article content from Business Insider",
|
||||
"site": "businessinsider.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "bi_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='byline'], [class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content-lock']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.businessinsider.com/*"
|
||||
}
|
||||
41
templates/cbsnews-article.json
Normal file
41
templates/cbsnews-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "CBS News Article",
|
||||
"description": "Extract article content from CBS News",
|
||||
"site": "cbsnews.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "cbs_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.cbsnews.com/*"
|
||||
}
|
||||
68
templates/chewy-product.json
Normal file
68
templates/chewy-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "Chewy Product",
|
||||
"description": "Extract product details from Chewy",
|
||||
"site": "chewy.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc3e",
|
||||
"schema": {
|
||||
"name": "chewy_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "weight_options",
|
||||
"selector": "[class*='weight'], [class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "auto_ship",
|
||||
"selector": "[class*='autoship'], [class*='subscribe']",
|
||||
"type": "exists"
|
||||
},
|
||||
{
|
||||
"name": "ingredients",
|
||||
"selector": "[class*='ingredient']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.chewy.com/*"
|
||||
}
|
||||
41
templates/cnet-article.json
Normal file
41
templates/cnet-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "CNET Article",
|
||||
"description": "Extract article content from CNET",
|
||||
"site": "cnet.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "cnet_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.cnet.com/*"
|
||||
}
|
||||
40
templates/cnn-article.json
Normal file
40
templates/cnn-article.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "CNN Article",
|
||||
"description": "Extract article content from CNN",
|
||||
"site": "cnn.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "cnn_article",
|
||||
"base_selector": ".article__content",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": ".byline",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": ".timestamp",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": ".article__content-container",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".image__container img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.cnn.com/*"
|
||||
}
|
||||
45
templates/coinmarketcap-coin.json
Normal file
45
templates/coinmarketcap-coin.json
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"name": "CoinMarketCap Coin",
|
||||
"description": "Extract cryptocurrency data from CoinMarketCap",
|
||||
"site": "coinmarketcap.com",
|
||||
"category": "financial",
|
||||
"icon": "\ud83e\ude99",
|
||||
"schema": {
|
||||
"name": "coinmarketcap",
|
||||
"base_selector": ".sc-16r8icm-0",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": ".sc-1q9q90x-0",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": ".priceValue",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "market_cap",
|
||||
"selector": ".statsValue",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "volume_24h",
|
||||
"selector": ".statsValue:not(:first-of-type)",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "circulating_supply",
|
||||
"selector": ".max-supply",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "change_24h",
|
||||
"selector": ".sc-15yy2pl-0 span:first-child",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.coinmarketcap.com/*"
|
||||
}
|
||||
41
templates/costco-product.json
Normal file
41
templates/costco-product.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Costco Product",
|
||||
"description": "Extract product details from Costco",
|
||||
"site": "costco.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfea",
|
||||
"schema": {
|
||||
"name": "costco_product",
|
||||
"base_selector": ".product-details",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": ".your-price",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "item_number",
|
||||
"selector": ".item-number",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "#product-description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".product-image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.costco.com/*"
|
||||
}
|
||||
18
templates/coverage_report.html
Normal file
18
templates/coverage_report.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<html>
|
||||
<head><title>Pry Scraper Templates — Coverage Report</title>
|
||||
<style>
|
||||
body { font-family:-apple-system,monospace; background:#0a0a0b; color:#e4e4e7; padding:2rem; }
|
||||
h1 { color:#f59e0b; }
|
||||
a { color:#60a5fa; }
|
||||
.ok { color:#4ade80; }
|
||||
.warn { color:#fbbf24; }
|
||||
.fail { color:#f87171; }
|
||||
table { border-collapse:collapse; width:100%; }
|
||||
th { text-align:left; padding:8px; border-bottom:2px solid #27272a; color:#a1a1aa; }
|
||||
td { padding:8px; border-bottom:1px solid #27272a; }
|
||||
</style></head>
|
||||
<body>
|
||||
<h1>Pry Scraper Templates</h1>
|
||||
<p>21 valid, 0 fixed, 89 failed</p>
|
||||
<table>
|
||||
<tr><th>Category</th><th>Count</th><th>Sites</th></tr><tr><td style='font-weight:bold;'>business</td><td>2</td><td>Crunchbase Company, Product Hunt Product</td></tr><tr><td style='font-weight:bold;'>classifieds</td><td>2</td><td>Craigslist Listing, Facebook Marketplace</td></tr><tr><td style='font-weight:bold;'>content</td><td>2</td><td>Substack Article, Medium Article</td></tr><tr><td style='font-weight:bold;'>development</td><td>1</td><td>GitHub Repository</td></tr><tr><td style='font-weight:bold;'>ecommerce</td><td>43</td><td>Best Buy Product, AliExpress Product, CVS Product, Walmart Product, West Elm Product, Amazon Search Results, JCPenney Product, Sephora Product, Dick's Sporting Goods Product, Etsy Product...</td></tr><tr><td style='font-weight:bold;'>financial</td><td>3</td><td>SEC EDGAR Filing, CoinMarketCap Coin, Yahoo Finance Quote</td></tr><tr><td style='font-weight:bold;'>local</td><td>1</td><td>Google Maps Place</td></tr><tr><td style='font-weight:bold;'>media</td><td>2</td><td>IMDb Movie, YouTube Video</td></tr><tr><td style='font-weight:bold;'>news</td><td>33</td><td>Wall Street Journal Article, Deutsche Welle Article, Al Jazeera Article, Ars Technica Article, BBC News Article, Zero Hedge Article, Financial Times Article, South China Morning Post Article, Hacker News Post, Politico Article...</td></tr><tr><td style='font-weight:bold;'>professional</td><td>6</td><td>ZipRecruiter Job, Monster Job, Indeed Job Posting, Glassdoor Job Posting, LinkedIn Job Posting, LinkedIn Profile</td></tr><tr><td style='font-weight:bold;'>real_estate</td><td>2</td><td>Zillow Listing, Realtor.com Listing</td></tr><tr><td style='font-weight:bold;'>reference</td><td>3</td><td>Google Patents, Wikipedia Article, USPTO Patent</td></tr><tr><td style='font-weight:bold;'>reviews</td><td>3</td><td>G2 Product Reviews, Trustpilot Reviews, Yelp Business</td></tr><tr><td style='font-weight:bold;'>social</td><td>3</td><td>TikTok Profile, Reddit Post, Twitter/X Profile</td></tr><tr><td style='font-weight:bold;'>sports</td><td>1</td><td>ESPN Sports Scores</td></tr><tr><td style='font-weight:bold;'>travel</td><td>3</td><td>Airbnb Listing, Booking.com Hotel, TripAdvisor Attraction</td></tr></table></body></html>
|
||||
41
templates/craigslist-listing.json
Normal file
41
templates/craigslist-listing.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Craigslist Listing",
|
||||
"description": "Extract listing details from Craigslist",
|
||||
"site": "craigslist.org",
|
||||
"category": "classifieds",
|
||||
"icon": "\ud83d\udccb",
|
||||
"schema": {
|
||||
"name": "craigslist_listing",
|
||||
"base_selector": ".page-container",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "#titletextonly",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": ".price",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"selector": ".postingtitletext small",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "#postingbody",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "posted_date",
|
||||
"selector": ".date.timeago",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.craigslist.org/*"
|
||||
}
|
||||
63
templates/crate-and-barrel-product.json
Normal file
63
templates/crate-and-barrel-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Crate & Barrel Product",
|
||||
"description": "Extract product details from Crate & Barrel",
|
||||
"site": "crateandbarrel.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfe0",
|
||||
"schema": {
|
||||
"name": "crate_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "dimensions",
|
||||
"selector": "[class*='dimension']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "material",
|
||||
"selector": "[class*='material']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color']",
|
||||
"type": "count"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.crateandbarrel.com/*"
|
||||
}
|
||||
51
templates/crunchbase-company.json
Normal file
51
templates/crunchbase-company.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "Crunchbase Company",
|
||||
"description": "Extract company info from Crunchbase",
|
||||
"site": "crunchbase.com",
|
||||
"category": "business",
|
||||
"icon": "\ud83c\udfe2",
|
||||
"schema": {
|
||||
"name": "crunchbase_company",
|
||||
"base_selector": ".page-container",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='short-description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "website",
|
||||
"selector": "a[href*='http']:not([href*='crunchbase'])",
|
||||
"type": "attribute",
|
||||
"attribute": "href"
|
||||
},
|
||||
{
|
||||
"name": "founded",
|
||||
"selector": "[class*='field-type-date_founded']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "employees",
|
||||
"selector": "[class*='field-type-organization_num_employees']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "funding",
|
||||
"selector": "[class*='field-type-money-raised']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "headquarters",
|
||||
"selector": "[class*='field-type-location']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.crunchbase.com/*"
|
||||
}
|
||||
63
templates/cvs-product.json
Normal file
63
templates/cvs-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "CVS Product",
|
||||
"description": "Extract product details from CVS",
|
||||
"site": "cvs.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc8a",
|
||||
"schema": {
|
||||
"name": "cvs_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"selector": "[class*='size']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "extrabucks",
|
||||
"selector": "[class*='extrabuck'], [class*='reward']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.cvs.com/*"
|
||||
}
|
||||
41
templates/dailymail-article.json
Normal file
41
templates/dailymail-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Daily Mail Article",
|
||||
"description": "Extract article content from Daily Mail",
|
||||
"site": "dailymail.co.uk",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "dm_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1, [class*='headline']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.dailymail.co.uk/*"
|
||||
}
|
||||
63
templates/dicks-sporting-goods.json
Normal file
63
templates/dicks-sporting-goods.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Dick's Sporting Goods Product",
|
||||
"description": "Extract product details from Dick's",
|
||||
"site": "dickssportinggoods.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfc0",
|
||||
"schema": {
|
||||
"name": "dicks_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"selector": "[itemprop='sku']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.dickssportinggoods.com/*"
|
||||
}
|
||||
41
templates/dw-article.json
Normal file
41
templates/dw-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Deutsche Welle Article",
|
||||
"description": "Extract article content from DW",
|
||||
"site": "dw.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "dw_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [class*='date']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='longtext']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.dw.com/*"
|
||||
}
|
||||
20
templates/ebay-listing.json
Normal file
20
templates/ebay-listing.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "eBay Listing",
|
||||
"description": "Extract product details from eBay listing pages",
|
||||
"site": "ebay.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🏪",
|
||||
"url_pattern": "*://www.ebay.com/itm/*",
|
||||
"schema": {
|
||||
"name": "ebay_listing",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1.x-item-title__mainTitle span", "type": "text"},
|
||||
{"name": "price", "selector": ".x-price-primary span", "type": "text", "transform": "float"},
|
||||
{"name": "condition", "selector": ".x-item-condition-text", "type": "text"},
|
||||
{"name": "seller", "selector": ".x-sellercard-atf__info__about-seller a", "type": "text"},
|
||||
{"name": "shipping", "selector": ".ux-label span[class*='shipping']", "type": "text"},
|
||||
{"name": "description", "selector": "#desc_ifr", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
41
templates/economist-article.json
Normal file
41
templates/economist-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "The Economist Article",
|
||||
"description": "Extract article content from The Economist",
|
||||
"site": "economist.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "economist_article",
|
||||
"base_selector": "article, main",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body'], [class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "rubric",
|
||||
"selector": "[class*='rubric'], h2",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.economist.com/*"
|
||||
}
|
||||
41
templates/espn-sports.json
Normal file
41
templates/espn-sports.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "ESPN Sports Scores",
|
||||
"description": "Extract sports scores and stats from ESPN",
|
||||
"site": "espn.com",
|
||||
"category": "sports",
|
||||
"icon": "\ud83c\udfc0",
|
||||
"schema": {
|
||||
"name": "espn_scores",
|
||||
"base_selector": ".Scoreboard",
|
||||
"fields": [
|
||||
{
|
||||
"name": "home_team",
|
||||
"selector": ".homeTeam",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "away_team",
|
||||
"selector": ".awayTeam",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "home_score",
|
||||
"selector": ".homeScore",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "away_score",
|
||||
"selector": ".awayScore",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"selector": ".gameStatus",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.espn.com/*"
|
||||
}
|
||||
21
templates/etsy-product.json
Normal file
21
templates/etsy-product.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Etsy Product",
|
||||
"description": "Extract product details from Etsy listing pages",
|
||||
"site": "etsy.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🧶",
|
||||
"url_pattern": "*://www.etsy.com/listing/*",
|
||||
"schema": {
|
||||
"name": "etsy_product",
|
||||
"base_selector": "[data-listing-id]",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1", "type": "text"},
|
||||
{"name": "price", "selector": ".wt-text-title-01", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": ".wt-display-inline-flex .wt-text-body-01", "type": "text", "transform": "float"},
|
||||
{"name": "review_count", "selector": ".wt-display-inline-flex a", "type": "text", "transform": "int"},
|
||||
{"name": "shop_name", "selector": ".wt-text-body-01 a[href*='/shop/']", "type": "text"},
|
||||
{"name": "image_url", "selector": ".carousel-image img", "type": "attribute", "attribute": "src"},
|
||||
{"name": "description", "selector": "[data-section-id='description']", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
41
templates/facebook-marketplace.json
Normal file
41
templates/facebook-marketplace.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Facebook Marketplace",
|
||||
"description": "Extract listing details from Facebook Marketplace",
|
||||
"site": "facebook.com",
|
||||
"category": "classifieds",
|
||||
"icon": "\ud83d\udcf1",
|
||||
"schema": {
|
||||
"name": "facebook_marketplace",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1, [class*='title']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"selector": "[class*='location']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "posted_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.facebook.com/*"
|
||||
}
|
||||
46
templates/financialtimes-article.json
Normal file
46
templates/financialtimes-article.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "Financial Times Article",
|
||||
"description": "Extract article content from Financial Times",
|
||||
"site": "ft.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "ft_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body'], [class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"selector": "[class*='standfirst']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.ft.com/*"
|
||||
}
|
||||
46
templates/forbes-article.json
Normal file
46
templates/forbes-article.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "Forbes Article",
|
||||
"description": "Extract article content from Forbes",
|
||||
"site": "forbes.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "forbes_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='contributor'], [class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body'], [class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='hero'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "category",
|
||||
"selector": "[class*='category'] a",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.forbes.com/*"
|
||||
}
|
||||
41
templates/foxnews-article.json
Normal file
41
templates/foxnews-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Fox News Article",
|
||||
"description": "Extract article content from Fox News",
|
||||
"site": "foxnews.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "fox_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.foxnews.com/*"
|
||||
}
|
||||
41
templates/france24-article.json
Normal file
41
templates/france24-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "France 24 Article",
|
||||
"description": "Extract article content from France 24",
|
||||
"site": "france24.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "f24_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content'], [class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.france24.com/*"
|
||||
}
|
||||
47
templates/g2-product.json
Normal file
47
templates/g2-product.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "G2 Product Reviews",
|
||||
"description": "Extract product reviews and ratings from G2",
|
||||
"site": "g2.com",
|
||||
"category": "reviews",
|
||||
"icon": "\u2b50",
|
||||
"schema": {
|
||||
"name": "g2_product",
|
||||
"base_selector": ".product-page",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating-number']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review-count']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='product-description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "category",
|
||||
"selector": "[class*='category']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "website",
|
||||
"selector": "[class*='website-link'] a",
|
||||
"type": "attribute",
|
||||
"attribute": "href"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.g2.com/*"
|
||||
}
|
||||
52
templates/gap-product.json
Normal file
52
templates/gap-product.json
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"name": "Gap Product",
|
||||
"description": "Extract product details from Gap",
|
||||
"site": "gap.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc55",
|
||||
"schema": {
|
||||
"name": "gap_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.gap.com/*"
|
||||
}
|
||||
20
templates/generic-product.json
Normal file
20
templates/generic-product.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "Generic E-commerce Product",
|
||||
"description": "Extract product details from most standard e-commerce sites",
|
||||
"site": "generic",
|
||||
"category": "ecommerce",
|
||||
"icon": "📦",
|
||||
"url_pattern": "*",
|
||||
"schema": {
|
||||
"name": "generic_product",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1, [class*='title'], [class*='product-name'], [itemprop='name']", "type": "text"},
|
||||
{"name": "price", "selector": "[class*='price'], [itemprop='price'], [class*='cost']", "type": "text", "transform": "float"},
|
||||
{"name": "description", "selector": "[class*='description'], [class*='desc'], [itemprop='description']", "type": "text"},
|
||||
{"name": "image_url", "selector": "[class*='gallery'] img, [class*='product-image'] img, [itemprop='image']", "type": "attribute", "attribute": "src"},
|
||||
{"name": "availability", "selector": "[itemprop='availability'], [class*='stock'], [class*='availability']", "type": "text"},
|
||||
{"name": "sku", "selector": "[itemprop='sku'], [class*='sku']", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
22
templates/github-repo.json
Normal file
22
templates/github-repo.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "GitHub Repository",
|
||||
"description": "Extract repository details from GitHub",
|
||||
"site": "github.com",
|
||||
"category": "development",
|
||||
"icon": "🐙",
|
||||
"url_pattern": "*://github.com/*/*",
|
||||
"schema": {
|
||||
"name": "github_repo",
|
||||
"base_selector": "main",
|
||||
"fields": [
|
||||
{"name": "name", "selector": "strong[itemprop='name']", "type": "text"},
|
||||
{"name": "description", "selector": "p[itemprop='description']", "type": "text"},
|
||||
{"name": "stars", "selector": "#repo-stars-counter-star", "type": "text", "transform": "int"},
|
||||
{"name": "forks", "selector": "#repo-network-counter", "type": "text", "transform": "int"},
|
||||
{"name": "language", "selector": "[itemprop='programmingLanguage']", "type": "text"},
|
||||
{"name": "license", "selector": "[itemprop='license']", "type": "text"},
|
||||
{"name": "last_updated", "selector": "relative-time", "type": "attribute", "attribute": "datetime"},
|
||||
{"name": "topics", "selector": ".topic-tag", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
19
templates/glassdoor-job.json
Normal file
19
templates/glassdoor-job.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "Glassdoor Job Posting",
|
||||
"description": "Extract job details from Glassdoor",
|
||||
"site": "glassdoor.com",
|
||||
"category": "professional",
|
||||
"icon": "🏢",
|
||||
"url_pattern": "*://www.glassdoor.com/Job/*",
|
||||
"schema": {
|
||||
"name": "glassdoor_job",
|
||||
"base_selector": ".JobDetails_jobDetailsSection",
|
||||
"fields": [
|
||||
{"name": "title", "selector": ".JobDetails_jobTitle", "type": "text"},
|
||||
{"name": "company", "selector": ".EmployerProfile_profileName", "type": "text"},
|
||||
{"name": "location", "selector": ".JobDetails_location", "type": "text"},
|
||||
{"name": "salary", "selector": ".SalaryEstimate", "type": "text"},
|
||||
{"name": "description", "selector": ".JobDetails_description", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
52
templates/google-maps-place.json
Normal file
52
templates/google-maps-place.json
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"name": "Google Maps Place",
|
||||
"description": "Extract place details from Google Maps",
|
||||
"site": "google.com/maps",
|
||||
"category": "local",
|
||||
"icon": "\ud83d\uddfa\ufe0f",
|
||||
"schema": {
|
||||
"name": "google_maps_place",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[aria-label*='stars']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "total_ratings",
|
||||
"selector": "[aria-label*='reviews']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "address",
|
||||
"selector": "[data-item-id='address']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "phone",
|
||||
"selector": "[data-item-id*='phone']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "website",
|
||||
"selector": "a[data-item-id*='authority']",
|
||||
"type": "attribute",
|
||||
"attribute": "href"
|
||||
},
|
||||
{
|
||||
"name": "hours",
|
||||
"selector": "[data-item-id*='oh']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.google.com/maps/*"
|
||||
}
|
||||
49
templates/google-patent.json
Normal file
49
templates/google-patent.json
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"name": "Google Patents",
|
||||
"description": "Extract patent details from Google Patents",
|
||||
"site": "patents.google.com",
|
||||
"category": "reference",
|
||||
"icon": "\ud83d\udcdc",
|
||||
"schema": {
|
||||
"name": "google_patent",
|
||||
"base_selector": "#page-content",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "inventor",
|
||||
"selector": "[data-assignment='inventor']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "assignee",
|
||||
"selector": "[data-assignment='assignee']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "filing_date",
|
||||
"selector": "[data-assignment='filing_date']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "publication_date",
|
||||
"selector": "[data-assignment='publication_date']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "abstract",
|
||||
"selector": ".abstract",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "claims",
|
||||
"selector": ".claims",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.patents.google.com/*"
|
||||
}
|
||||
57
templates/h-and-m-product.json
Normal file
57
templates/h-and-m-product.json
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"name": "H&M Product",
|
||||
"description": "Extract product details from H&M",
|
||||
"site": "hm.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc55",
|
||||
"schema": {
|
||||
"name": "hm_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color'], [class*='swatch']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "material",
|
||||
"selector": "[class*='material']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.hm.com/*"
|
||||
}
|
||||
19
templates/hackernews-post.json
Normal file
19
templates/hackernews-post.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "Hacker News Post",
|
||||
"description": "Extract post details from Hacker News",
|
||||
"site": "news.ycombinator.com",
|
||||
"category": "news",
|
||||
"icon": "📰",
|
||||
"url_pattern": "*://news.ycombinator.com/item*",
|
||||
"schema": {
|
||||
"name": "hackernews_post",
|
||||
"base_selector": ".fatitem",
|
||||
"fields": [
|
||||
{"name": "title", "selector": ".title a", "type": "text"},
|
||||
{"name": "url", "selector": ".title a", "type": "attribute", "attribute": "href"},
|
||||
{"name": "points", "selector": ".score", "type": "text", "transform": "int"},
|
||||
{"name": "author", "selector": ".hnuser", "type": "text"},
|
||||
{"name": "comment_count", "selector": ".subtext a:last-child", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
53
templates/homedepot-product.json
Normal file
53
templates/homedepot-product.json
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "Home Depot Product",
|
||||
"description": "Extract product details from Home Depot",
|
||||
"site": "homedepot.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfea",
|
||||
"schema": {
|
||||
"name": "homedepot_product",
|
||||
"base_selector": ".product-details",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": ".price-format__large",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": ".rating-stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": ".product-reviews",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "model",
|
||||
"selector": ".product-details__model-number",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "#product-description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".product-images img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.homedepot.com/*"
|
||||
}
|
||||
63
templates/ikea-product.json
Normal file
63
templates/ikea-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "IKEA Product",
|
||||
"description": "Extract product details from IKEA",
|
||||
"site": "ikea.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83e\ude91",
|
||||
"schema": {
|
||||
"name": "ikea_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price'], span[class*='currency']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description'], [class*='product-description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "measurements",
|
||||
"selector": "[class*='measurement']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "material",
|
||||
"selector": "[class*='material']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img, .product-image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "article_number",
|
||||
"selector": "[class*='article'], [class*='number']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], [class*='stars']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.ikea.com/*"
|
||||
}
|
||||
23
templates/imdb-movie.json
Normal file
23
templates/imdb-movie.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "IMDb Movie",
|
||||
"description": "Extract movie details from IMDb",
|
||||
"site": "imdb.com",
|
||||
"category": "media",
|
||||
"icon": "🎬",
|
||||
"url_pattern": "*://www.imdb.com/title/*",
|
||||
"schema": {
|
||||
"name": "imdb_movie",
|
||||
"base_selector": "#__next",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1", "type": "text"},
|
||||
{"name": "year", "selector": "ul li:first-child a", "type": "text"},
|
||||
{"name": "rating", "selector": "[data-testid='hero-rating-bar__aggregate-rating__score']", "type": "text", "transform": "float"},
|
||||
{"name": "rating_count", "selector": "[data-testid='hero-rating-bar__aggregate-rating__count']", "type": "text", "transform": "int"},
|
||||
{"name": "description", "selector": "[data-testid='plot-xs_to_m']", "type": "text"},
|
||||
{"name": "director", "selector": "[data-testid='title-pc-principal-credit']", "type": "text"},
|
||||
{"name": "cast", "selector": "[data-testid='title-cast-item']", "type": "text"},
|
||||
{"name": "genres", "selector": "[data-testid='genres']", "type": "text"},
|
||||
{"name": "poster", "selector": ".ipc-image", "type": "attribute", "attribute": "src"}
|
||||
]
|
||||
}
|
||||
}
|
||||
20
templates/indeed-job.json
Normal file
20
templates/indeed-job.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "Indeed Job Posting",
|
||||
"description": "Extract job details from Indeed",
|
||||
"site": "indeed.com",
|
||||
"category": "professional",
|
||||
"icon": "💼",
|
||||
"url_pattern": "*://www.indeed.com/viewjob*",
|
||||
"schema": {
|
||||
"name": "indeed_job",
|
||||
"base_selector": ".jobsearch-ViewJobLayout",
|
||||
"fields": [
|
||||
{"name": "title", "selector": ".jobsearch-JobInfoHeader-title", "type": "text"},
|
||||
{"name": "company", "selector": ".jobsearch-InlineCompanyRating .css-6z8f9v", "type": "text"},
|
||||
{"name": "location", "selector": ".jobsearch-JobInfoHeader-subtitle .css-6z8f9v", "type": "text"},
|
||||
{"name": "salary", "selector": "#salaryInfoAndJobType", "type": "text"},
|
||||
{"name": "description", "selector": "#jobDescriptionText", "type": "text"},
|
||||
{"name": "post_date", "selector": ".css-1cwevpf", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
59
templates/jcpenney-product.json
Normal file
59
templates/jcpenney-product.json
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"name": "JCPenney Product",
|
||||
"description": "Extract product details from JCPenney",
|
||||
"site": "jcpenney.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfea",
|
||||
"schema": {
|
||||
"name": "jcpenney_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "sale_percent",
|
||||
"selector": "[class*='savings'], [class*='percent']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.jcpenney.com/*"
|
||||
}
|
||||
59
templates/kohls-product.json
Normal file
59
templates/kohls-product.json
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"name": "Kohl's Product",
|
||||
"description": "Extract product details from Kohl's",
|
||||
"site": "kohls.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfea",
|
||||
"schema": {
|
||||
"name": "kohls_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "kohl_cash",
|
||||
"selector": "[class*='cash']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.kohls.com/*"
|
||||
}
|
||||
19
templates/linkedin-job.json
Normal file
19
templates/linkedin-job.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "LinkedIn Job Posting",
|
||||
"description": "Extract job posting details from LinkedIn",
|
||||
"site": "linkedin.com",
|
||||
"category": "professional",
|
||||
"icon": "💼",
|
||||
"url_pattern": "*://www.linkedin.com/jobs/*",
|
||||
"schema": {
|
||||
"name": "linkedin_job",
|
||||
"base_selector": ".jobs-search__job-details",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1", "type": "text"},
|
||||
{"name": "company", "selector": ".job-details-jobs-unified-top-card__company-name", "type": "text"},
|
||||
{"name": "location", "selector": ".job-details-jobs-unified-top-card__bullet", "type": "text"},
|
||||
{"name": "description", "selector": "#job-details", "type": "text"},
|
||||
{"name": "post_date", "selector": ".job-details-jobs-unified-top-card__posted-date", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
21
templates/linkedin-profile.json
Normal file
21
templates/linkedin-profile.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "LinkedIn Profile",
|
||||
"description": "Extract profile information from LinkedIn public profiles",
|
||||
"site": "linkedin.com",
|
||||
"category": "professional",
|
||||
"icon": "💼",
|
||||
"url_pattern": "*://www.linkedin.com/in/*",
|
||||
"schema": {
|
||||
"name": "linkedin_profile",
|
||||
"base_selector": ".profile-detail",
|
||||
"fields": [
|
||||
{"name": "name", "selector": "h1", "type": "text"},
|
||||
{"name": "headline", "selector": ".text-body-medium", "type": "text"},
|
||||
{"name": "location", "selector": ".text-body-small.inline", "type": "text"},
|
||||
{"name": "about", "selector": "#about ~ div", "type": "text"},
|
||||
{"name": "experience", "selector": "#experience ~ .display-flex li", "type": "text"},
|
||||
{"name": "education", "selector": "#education ~ .display-flex li", "type": "text"},
|
||||
{"name": "profile_image", "selector": ".profile-photo-edit img", "type": "attribute", "attribute": "src"}
|
||||
]
|
||||
}
|
||||
}
|
||||
47
templates/lowes-product.json
Normal file
47
templates/lowes-product.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "Lowe's Product",
|
||||
"description": "Extract product details from Lowe's",
|
||||
"site": "lowes.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfea",
|
||||
"schema": {
|
||||
"name": "lowes_product",
|
||||
"base_selector": ".product-details",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": ".price-main",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": ".rating-stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"selector": "[itemprop='sku']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "#product-description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".gallery-image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.lowes.com/*"
|
||||
}
|
||||
68
templates/lululemon-product.json
Normal file
68
templates/lululemon-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "Lululemon Product",
|
||||
"description": "Extract product details from Lululemon",
|
||||
"site": "lululemon.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83e\uddd8",
|
||||
"schema": {
|
||||
"name": "lululemon_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color'], [class*='swatch']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "size_fit",
|
||||
"selector": "[class*='fit'], [class*='size-guide']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "material",
|
||||
"selector": "[class*='material'], [class*='fabric']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.lululemon.com/*"
|
||||
}
|
||||
64
templates/macys-product.json
Normal file
64
templates/macys-product.json
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "Macy's Product",
|
||||
"description": "Extract product details from Macy's",
|
||||
"site": "macys.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udecd\ufe0f",
|
||||
"schema": {
|
||||
"name": "macys_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price'], [itemprop='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original'], [class*='was']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img, .product-image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "sale_percent",
|
||||
"selector": "[class*='sale'], [class*='percent']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.macys.com/*"
|
||||
}
|
||||
52
templates/medium-article.json
Normal file
52
templates/medium-article.json
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"name": "Medium Article",
|
||||
"description": "Extract article content from Medium",
|
||||
"site": "medium.com",
|
||||
"category": "content",
|
||||
"icon": "\ud83d\udcdd",
|
||||
"schema": {
|
||||
"name": "medium_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "a[href*='/@']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "reading_time",
|
||||
"selector": "[class*='readingTime']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "claps",
|
||||
"selector": "[class*='clapButton']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": ".pw-post-body",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": ".pw-post-body img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.medium.com/*"
|
||||
}
|
||||
44
templates/monster-job.json
Normal file
44
templates/monster-job.json
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "Monster Job",
|
||||
"description": "Extract job posting from Monster",
|
||||
"site": "monster.com",
|
||||
"category": "professional",
|
||||
"icon": "\ud83d\udcbc",
|
||||
"schema": {
|
||||
"name": "monster_job",
|
||||
"base_selector": ".job-view",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "company",
|
||||
"selector": ".company",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"selector": ".location",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "salary",
|
||||
"selector": ".salary",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": ".job-description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "posted_date",
|
||||
"selector": ".posted",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.monster.com/*"
|
||||
}
|
||||
41
templates/nbcnews-article.json
Normal file
41
templates/nbcnews-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "NBC News Article",
|
||||
"description": "Extract article content from NBC News",
|
||||
"site": "nbcnews.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "nbc_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='byline']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.nbcnews.com/*"
|
||||
}
|
||||
68
templates/newegg-product.json
Normal file
68
templates/newegg-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "Newegg Product",
|
||||
"description": "Extract product details from Newegg",
|
||||
"site": "newegg.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udcbb",
|
||||
"schema": {
|
||||
"name": "newegg_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "model",
|
||||
"selector": "[class*='model']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "shipping",
|
||||
"selector": "[class*='shipping']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "stock",
|
||||
"selector": "[class*='stock'], [class*='availability']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.newegg.com/*"
|
||||
}
|
||||
63
templates/nike-product.json
Normal file
63
templates/nike-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Nike Product",
|
||||
"description": "Extract product details from Nike",
|
||||
"site": "nike.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc5f",
|
||||
"schema": {
|
||||
"name": "nike_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1, [class*='product-name']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], [class*='star']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"selector": "[class*='sku'], [itemprop='sku']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.nike.com/*"
|
||||
}
|
||||
69
templates/nordstrom-product.json
Normal file
69
templates/nordstrom-product.json
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
"name": "Nordstrom Product",
|
||||
"description": "Extract product details from Nordstrom",
|
||||
"site": "nordstrom.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udecd\ufe0f",
|
||||
"schema": {
|
||||
"name": "nordstrom_product",
|
||||
"base_selector": ".product-details",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img, figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='swatch']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "availability",
|
||||
"selector": "[class*='fulfillment'], [class*='availability']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.nordstrom.com/*"
|
||||
}
|
||||
47
templates/nytimes-article.json
Normal file
47
templates/nytimes-article.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "NYT Article",
|
||||
"description": "Extract article content from NYTimes",
|
||||
"site": "nytimes.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "nytimes_article",
|
||||
"base_selector": "main",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[itemprop='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": ".article-body",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "word_count",
|
||||
"selector": "article",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.nytimes.com/*"
|
||||
}
|
||||
58
templates/officedepot-product.json
Normal file
58
templates/officedepot-product.json
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"name": "Office Depot Product",
|
||||
"description": "Extract product details from Office Depot",
|
||||
"site": "officedepot.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udcce",
|
||||
"schema": {
|
||||
"name": "officedepot_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "model",
|
||||
"selector": "[class*='model']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "sku",
|
||||
"selector": "[itemprop='sku']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.officedepot.com/*"
|
||||
}
|
||||
64
templates/old-navy-product.json
Normal file
64
templates/old-navy-product.json
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "Old Navy Product",
|
||||
"description": "Extract product details from Old Navy",
|
||||
"site": "oldnavy.gap.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc55",
|
||||
"schema": {
|
||||
"name": "oldnavy_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "original_price",
|
||||
"selector": "[class*='original']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size_options",
|
||||
"selector": "[class*='size']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.oldnavy.gap.com/*"
|
||||
}
|
||||
63
templates/petsmart-product.json
Normal file
63
templates/petsmart-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "PetSmart Product",
|
||||
"description": "Extract product details from PetSmart",
|
||||
"site": "petsmart.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc3e",
|
||||
"schema": {
|
||||
"name": "petsmart_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "pet_type",
|
||||
"selector": "[class*='pet']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "in_store",
|
||||
"selector": "[class*='store']",
|
||||
"type": "exists"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.petsmart.com/*"
|
||||
}
|
||||
41
templates/politico-article.json
Normal file
41
templates/politico-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Politico Article",
|
||||
"description": "Extract article content from Politico",
|
||||
"site": "politico.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "politico_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='byline'], [class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [class*='timestamp']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='story-text']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.politico.com/*"
|
||||
}
|
||||
63
templates/pottery-barn-product.json
Normal file
63
templates/pottery-barn-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Pottery Barn Product",
|
||||
"description": "Extract product details from Pottery Barn",
|
||||
"site": "potterybarn.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfe0",
|
||||
"schema": {
|
||||
"name": "potterybarn_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "dimensions",
|
||||
"selector": "[class*='dimension']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "color_options",
|
||||
"selector": "[class*='color']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "shipping_info",
|
||||
"selector": "[class*='shipping']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.potterybarn.com/*"
|
||||
}
|
||||
58
templates/producthunt-product.json
Normal file
58
templates/producthunt-product.json
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"name": "Product Hunt Product",
|
||||
"description": "Extract product details from Product Hunt",
|
||||
"site": "producthunt.com",
|
||||
"category": "business",
|
||||
"icon": "\ud83d\ude80",
|
||||
"schema": {
|
||||
"name": "product_hunt",
|
||||
"base_selector": "[data-test^='post']",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": "h1, [data-test='post-name']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "tagline",
|
||||
"selector": "[data-test='post-tagline']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "upvotes",
|
||||
"selector": "[data-test='vote-button']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "comments",
|
||||
"selector": "[data-test='comment-count']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[data-test='post-description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "website",
|
||||
"selector": "[data-test='post-website'] a",
|
||||
"type": "attribute",
|
||||
"attribute": "href"
|
||||
},
|
||||
{
|
||||
"name": "maker",
|
||||
"selector": "[data-test='maker-card']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[data-test='post-thumbnail'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.producthunt.com/*"
|
||||
}
|
||||
59
templates/realtor-listing.json
Normal file
59
templates/realtor-listing.json
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"name": "Realtor.com Listing",
|
||||
"description": "Extract real estate listing from Realtor.com",
|
||||
"site": "realtor.com",
|
||||
"category": "real_estate",
|
||||
"icon": "\ud83c\udfe1",
|
||||
"schema": {
|
||||
"name": "realtor_listing",
|
||||
"base_selector": ".listing-details",
|
||||
"fields": [
|
||||
{
|
||||
"name": "address",
|
||||
"selector": "[class*='address']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "bedrooms",
|
||||
"selector": "[data-testid='bed']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "bathrooms",
|
||||
"selector": "[data-testid='bath']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "sqft",
|
||||
"selector": "[data-testid='sqft']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='gallery'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "listing_agent",
|
||||
"selector": "[class*='agent-name']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.realtor.com/*"
|
||||
}
|
||||
20
templates/reddit-post.json
Normal file
20
templates/reddit-post.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "Reddit Post",
|
||||
"description": "Extract post details from Reddit",
|
||||
"site": "reddit.com",
|
||||
"category": "social",
|
||||
"icon": "💬",
|
||||
"url_pattern": "*://www.reddit.com/r/*/comments/*",
|
||||
"schema": {
|
||||
"name": "reddit_post",
|
||||
"base_selector": "[data-testid='post-container']",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1", "type": "text"},
|
||||
{"name": "author", "selector": "a[href*='/user/']", "type": "text"},
|
||||
{"name": "score", "selector": "[id^='vote-arrows']", "type": "text", "transform": "int"},
|
||||
{"name": "subreddit", "selector": "[data-testid='subreddit-name']", "type": "text"},
|
||||
{"name": "body", "selector": "[data-testid='post-content']", "type": "text"},
|
||||
{"name": "comment_count", "selector": "[data-testid='comment-count']", "type": "text", "transform": "int"}
|
||||
]
|
||||
}
|
||||
}
|
||||
64
templates/rei-product.json
Normal file
64
templates/rei-product.json
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "REI Product",
|
||||
"description": "Extract product details from REI",
|
||||
"site": "rei.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfd4\ufe0f",
|
||||
"schema": {
|
||||
"name": "rei_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "in_store_pickup",
|
||||
"selector": "[class*='store'], [class*='pickup']",
|
||||
"type": "exists"
|
||||
},
|
||||
{
|
||||
"name": "member_price",
|
||||
"selector": "[class*='member']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.rei.com/*"
|
||||
}
|
||||
51
templates/reuters-article.json
Normal file
51
templates/reuters-article.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "Reuters Article",
|
||||
"description": "Extract article content from Reuters",
|
||||
"site": "reuters.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "reuters_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"selector": "[class*='summary'], h2",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "section",
|
||||
"selector": "[class*='nav'] a[class*='active']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.reuters.com/*"
|
||||
}
|
||||
68
templates/samsclub-product.json
Normal file
68
templates/samsclub-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "Sam's Club Product",
|
||||
"description": "Extract product details from Sam's Club",
|
||||
"site": "samsclub.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83c\udfea",
|
||||
"schema": {
|
||||
"name": "samsclub_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "item_number",
|
||||
"selector": "[class*='item'], [class*='sku']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "in_club_only",
|
||||
"selector": "[class*='club'], [class*='warehouse']",
|
||||
"type": "exists"
|
||||
},
|
||||
{
|
||||
"name": "shipping_info",
|
||||
"selector": "[class*='shipping']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.samsclub.com/*"
|
||||
}
|
||||
41
templates/scmp-article.json
Normal file
41
templates/scmp-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "South China Morning Post Article",
|
||||
"description": "Extract article content from SCMP",
|
||||
"site": "scmp.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "scmp_article",
|
||||
"base_selector": "article, .story",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content'], [class*='story-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.scmp.com/*"
|
||||
}
|
||||
45
templates/sec-edgar-filing.json
Normal file
45
templates/sec-edgar-filing.json
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"name": "SEC EDGAR Filing",
|
||||
"description": "Extract filing metadata from SEC EDGAR",
|
||||
"site": "sec.gov",
|
||||
"category": "financial",
|
||||
"icon": "\ud83c\udfdb\ufe0f",
|
||||
"schema": {
|
||||
"name": "sec_edgar",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{
|
||||
"name": "company_name",
|
||||
"selector": ".companyName",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "filing_type",
|
||||
"selector": ".identifyWork",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "cik",
|
||||
"selector": ".identifyInfo a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "filing_date",
|
||||
"selector": ".identifyInfo",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": ".formGrouping",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "filing_url",
|
||||
"selector": ".formGrouping a",
|
||||
"type": "attribute",
|
||||
"attribute": "href"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.sec.gov/*"
|
||||
}
|
||||
68
templates/sephora-product.json
Normal file
68
templates/sephora-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "Sephora Product",
|
||||
"description": "Extract product details from Sephora",
|
||||
"site": "sephora.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc84",
|
||||
"schema": {
|
||||
"name": "sephora_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1, [class*='product-name']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], [class*='stars']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description'], [class*='details']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img, .product-image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "shade_count",
|
||||
"selector": "[class*='shade'], [class*='swatch']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"selector": "[class*='size']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "how_to_use",
|
||||
"selector": "[class*='how-to']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.sephora.com/*"
|
||||
}
|
||||
63
templates/staples-product.json
Normal file
63
templates/staples-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Staples Product",
|
||||
"description": "Extract product details from Staples",
|
||||
"site": "staples.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udcce",
|
||||
"schema": {
|
||||
"name": "staples_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "model",
|
||||
"selector": "[class*='model'], [itemprop='model']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "in_stock",
|
||||
"selector": "[class*='stock']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "delivery_options",
|
||||
"selector": "[class*='delivery']",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.staples.com/*"
|
||||
}
|
||||
40
templates/substack-article.json
Normal file
40
templates/substack-article.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "Substack Article",
|
||||
"description": "Extract article content from Substack",
|
||||
"site": "substack.com",
|
||||
"category": "content",
|
||||
"icon": "\u2709\ufe0f",
|
||||
"schema": {
|
||||
"name": "substack_article",
|
||||
"base_selector": ".main-content",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": ".byline-wrapper a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "subtitle",
|
||||
"selector": "h3, .subtitle",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": ".body-markdown",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, .post-date",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.substack.com/*"
|
||||
}
|
||||
21
templates/target-product.json
Normal file
21
templates/target-product.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Target Product",
|
||||
"description": "Extract product details from Target product pages",
|
||||
"site": "target.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🎯",
|
||||
"url_pattern": "*://www.target.com/p/*",
|
||||
"schema": {
|
||||
"name": "target_product",
|
||||
"base_selector": "[data-test='product-details']",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "[data-test='product-title']", "type": "text"},
|
||||
{"name": "price", "selector": "[data-test='product-price']", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": "[data-test='rating']", "type": "text", "transform": "float"},
|
||||
{"name": "review_count", "selector": "[data-test='reviews-count']", "type": "text", "transform": "int"},
|
||||
{"name": "description", "selector": "[data-test='product-description']", "type": "text"},
|
||||
{"name": "image_url", "selector": "[data-test='hero-image'] img", "type": "attribute", "attribute": "src"},
|
||||
{"name": "fulfillment", "selector": "[data-test='fulfillment']", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
41
templates/techcrunch-article.json
Normal file
41
templates/techcrunch-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "TechCrunch Article",
|
||||
"description": "Extract article content from TechCrunch",
|
||||
"site": "techcrunch.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "tc_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author'], .author-name",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": ".article-content",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='featured'] img, figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.techcrunch.com/*"
|
||||
}
|
||||
151
templates/test_live.py
Normal file
151
templates/test_live.py
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Live template verification script — run on Talos with network access."""
|
||||
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
import httpx
|
||||
|
||||
TEMPLATES = [
|
||||
("abcnews-article", "abcnews.go.com", "news"),
|
||||
("adidas-product", "adidas.com", "ecommerce"),
|
||||
("airbnb-listing", "airbnb.com", "travel"),
|
||||
("aliexpress-product", "aliexpress.com", "ecommerce"),
|
||||
("aljazeera-article", "aljazeera.com", "news"),
|
||||
("amazon-product", "amazon.com", "ecommerce"),
|
||||
("amazon-search", "amazon.com", "ecommerce"),
|
||||
("arstechnica-article", "arstechnica.com", "news"),
|
||||
("asos-product", "asos.com", "ecommerce"),
|
||||
("associated-press-article", "apnews.com", "news"),
|
||||
("axios-article", "axios.com", "news"),
|
||||
("bbc-article", "bbc.com", "news"),
|
||||
("bestbuy-product", "bestbuy.com", "ecommerce"),
|
||||
("bhphotovideo-product", "bhphotovideo.com", "ecommerce"),
|
||||
("bloomberg-article", "bloomberg.com", "news"),
|
||||
("booking-hotel", "booking.com", "travel"),
|
||||
("businessinsider-article", "businessinsider.com", "news"),
|
||||
("cbsnews-article", "cbsnews.com", "news"),
|
||||
("chewy-product", "chewy.com", "ecommerce"),
|
||||
("cnet-article", "cnet.com", "news"),
|
||||
("cnn-article", "cnn.com", "news"),
|
||||
("coinmarketcap-coin", "coinmarketcap.com", "financial"),
|
||||
("costco-product", "costco.com", "ecommerce"),
|
||||
("craigslist-listing", "craigslist.org", "classifieds"),
|
||||
("crate-and-barrel-product", "crateandbarrel.com", "ecommerce"),
|
||||
("crunchbase-company", "crunchbase.com", "business"),
|
||||
("cvs-product", "cvs.com", "ecommerce"),
|
||||
("dailymail-article", "dailymail.co.uk", "news"),
|
||||
("dicks-sporting-goods", "dickssportinggoods.com", "ecommerce"),
|
||||
("dw-article", "dw.com", "news"),
|
||||
("ebay-listing", "ebay.com", "ecommerce"),
|
||||
("economist-article", "economist.com", "news"),
|
||||
("espn-sports", "espn.com", "sports"),
|
||||
("etsy-product", "etsy.com", "ecommerce"),
|
||||
("facebook-marketplace", "facebook.com", "classifieds"),
|
||||
("financialtimes-article", "ft.com", "news"),
|
||||
("forbes-article", "forbes.com", "news"),
|
||||
("foxnews-article", "foxnews.com", "news"),
|
||||
("france24-article", "france24.com", "news"),
|
||||
("g2-product", "g2.com", "reviews"),
|
||||
("gap-product", "gap.com", "ecommerce"),
|
||||
("generic-product", "generic", "ecommerce"),
|
||||
("github-repo", "github.com", "development"),
|
||||
("glassdoor-job", "glassdoor.com", "professional"),
|
||||
("google-maps-place", "google.com/maps", "local"),
|
||||
("google-patent", "patents.google.com", "reference"),
|
||||
("h-and-m-product", "hm.com", "ecommerce"),
|
||||
("hackernews-post", "news.ycombinator.com", "news"),
|
||||
("homedepot-product", "homedepot.com", "ecommerce"),
|
||||
("ikea-product", "ikea.com", "ecommerce"),
|
||||
("imdb-movie", "imdb.com", "media"),
|
||||
("indeed-job", "indeed.com", "professional"),
|
||||
("jcpenney-product", "jcpenney.com", "ecommerce"),
|
||||
("kohls-product", "kohls.com", "ecommerce"),
|
||||
("linkedin-job", "linkedin.com", "professional"),
|
||||
("linkedin-profile", "linkedin.com", "professional"),
|
||||
("lowes-product", "lowes.com", "ecommerce"),
|
||||
("lululemon-product", "lululemon.com", "ecommerce"),
|
||||
("macys-product", "macys.com", "ecommerce"),
|
||||
("medium-article", "medium.com", "content"),
|
||||
("monster-job", "monster.com", "professional"),
|
||||
("nbcnews-article", "nbcnews.com", "news"),
|
||||
("newegg-product", "newegg.com", "ecommerce"),
|
||||
("nike-product", "nike.com", "ecommerce"),
|
||||
("nordstrom-product", "nordstrom.com", "ecommerce"),
|
||||
("nytimes-article", "nytimes.com", "news"),
|
||||
("officedepot-product", "officedepot.com", "ecommerce"),
|
||||
("old-navy-product", "oldnavy.gap.com", "ecommerce"),
|
||||
("petsmart-product", "petsmart.com", "ecommerce"),
|
||||
("politico-article", "politico.com", "news"),
|
||||
("pottery-barn-product", "potterybarn.com", "ecommerce"),
|
||||
("producthunt-product", "producthunt.com", "business"),
|
||||
("realtor-listing", "realtor.com", "real_estate"),
|
||||
("reddit-post", "reddit.com", "social"),
|
||||
("rei-product", "rei.com", "ecommerce"),
|
||||
("reuters-article", "reuters.com", "news"),
|
||||
("samsclub-product", "samsclub.com", "ecommerce"),
|
||||
("scmp-article", "scmp.com", "news"),
|
||||
("sec-edgar-filing", "sec.gov", "financial"),
|
||||
("sephora-product", "sephora.com", "ecommerce"),
|
||||
("staples-product", "staples.com", "ecommerce"),
|
||||
("substack-article", "substack.com", "content"),
|
||||
("target-product", "target.com", "ecommerce"),
|
||||
("techcrunch-article", "techcrunch.com", "news"),
|
||||
("theguardian-article", "theguardian.com", "news"),
|
||||
("theverge-article", "theverge.com", "news"),
|
||||
("tiktok-profile", "tiktok.com", "social"),
|
||||
("time-article", "time.com", "news"),
|
||||
("tripadvisor-attraction", "tripadvisor.com", "travel"),
|
||||
("trustpilot-reviews", "trustpilot.com", "reviews"),
|
||||
("twitter-profile", "twitter.com", "social"),
|
||||
("ulta-product", "ulta.com", "ecommerce"),
|
||||
("usatoday-article", "usatoday.com", "news"),
|
||||
("uspto-patent", "uspto.gov", "reference"),
|
||||
("walgreens-product", "walgreens.com", "ecommerce"),
|
||||
("walmart-grocery-product", "walmart.com", "ecommerce"),
|
||||
("walmart-product", "walmart.com", "ecommerce"),
|
||||
("washingtonpost-article", "washingtonpost.com", "news"),
|
||||
("wayfair-product", "wayfair.com", "ecommerce"),
|
||||
("west-elm-product", "westelm.com", "ecommerce"),
|
||||
("wikipedia-article", "wikipedia.org", "reference"),
|
||||
("wired-article", "wired.com", "news"),
|
||||
("wsj-article", "wsj.com", "news"),
|
||||
("yahoo-finance-quote", "finance.yahoo.com", "financial"),
|
||||
("yelp-business", "yelp.com", "reviews"),
|
||||
("youtube-video", "youtube.com", "media"),
|
||||
("zara-product", "zara.com", "ecommerce"),
|
||||
("zerohedge-article", "zerohedge.com", "news"),
|
||||
("zillow-listing", "zillow.com", "real_estate"),
|
||||
("ziprecruiter-job", "ziprecruiter.com", "professional"),
|
||||
]
|
||||
|
||||
|
||||
async def test_all():
|
||||
failures = []
|
||||
async with httpx.AsyncClient(timeout=30) as c:
|
||||
for tid, site, cat in TEMPLATES:
|
||||
print(f"Testing {tid}...", end=" ", flush=True)
|
||||
try:
|
||||
r = await c.post(
|
||||
"http://localhost:8002/v1/templates/execute",
|
||||
json={"template_id": tid, "url": f"https://www.{site}"},
|
||||
timeout=30,
|
||||
)
|
||||
if r.is_success and r.json().get("success"):
|
||||
print("OK")
|
||||
else:
|
||||
print(f"FAIL: {r.text[:80]}")
|
||||
failures.append(tid)
|
||||
await asyncio.sleep(0.5)
|
||||
except Exception as e:
|
||||
print(f"ERR: {e}")
|
||||
failures.append(tid)
|
||||
|
||||
print(f"\n{len([t for t in TEMPLATES])} tested, {len(failures)} failed")
|
||||
if failures:
|
||||
print("Failed:", ", ".join(failures))
|
||||
return 1 if failures else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(asyncio.run(test_all()))
|
||||
51
templates/theguardian-article.json
Normal file
51
templates/theguardian-article.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "The Guardian Article",
|
||||
"description": "Extract article content from The Guardian",
|
||||
"site": "theguardian.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "guardian_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='byline']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time, [class*='date']",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='article-body']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"selector": "[class*='standfirst']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "section",
|
||||
"selector": "[class*='section'] a",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.theguardian.com/*"
|
||||
}
|
||||
41
templates/theverge-article.json
Normal file
41
templates/theverge-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "The Verge Article",
|
||||
"description": "Extract article content from The Verge",
|
||||
"site": "theverge.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "verge_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author'] a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.theverge.com/*"
|
||||
}
|
||||
48
templates/tiktok-profile.json
Normal file
48
templates/tiktok-profile.json
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"name": "TikTok Profile",
|
||||
"description": "Extract profile info from TikTok",
|
||||
"site": "tiktok.com",
|
||||
"category": "social",
|
||||
"icon": "\ud83c\udfb5",
|
||||
"schema": {
|
||||
"name": "tiktok_profile",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{
|
||||
"name": "username",
|
||||
"selector": "h1, [class*='share-title'], [data-e2e='user-title']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "bio",
|
||||
"selector": "h2, [class*='share-desc'], [data-e2e='user-desc']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "followers",
|
||||
"selector": "[class*='follower-count'], strong:contains('Followers')",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "following",
|
||||
"selector": "[class*='following-count'], strong:contains('Following')",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "likes",
|
||||
"selector": "[class*='like-count'], strong:contains('Likes')",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "avatar",
|
||||
"selector": "[class*='avatar'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.tiktok.com/*"
|
||||
}
|
||||
41
templates/time-article.json
Normal file
41
templates/time-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "Time Magazine Article",
|
||||
"description": "Extract article content from Time",
|
||||
"site": "time.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "time_article",
|
||||
"base_selector": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img, [class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.time.com/*"
|
||||
}
|
||||
46
templates/tripadvisor-attraction.json
Normal file
46
templates/tripadvisor-attraction.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "TripAdvisor Attraction",
|
||||
"description": "Extract attraction details from TripAdvisor",
|
||||
"site": "tripadvisor.com",
|
||||
"category": "travel",
|
||||
"icon": "\u2708\ufe0f",
|
||||
"schema": {
|
||||
"name": "tripadvisor_attraction",
|
||||
"base_selector": ".page-wrapper",
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": ".ui_bubble_rating",
|
||||
"type": "attribute",
|
||||
"attribute": "class"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": ".reviewCount",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "rank",
|
||||
"selector": ".ranking",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": ".description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"selector": ".address",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.tripadvisor.com/*"
|
||||
}
|
||||
46
templates/trustpilot-reviews.json
Normal file
46
templates/trustpilot-reviews.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "Trustpilot Reviews",
|
||||
"description": "Extract reviews from Trustpilot",
|
||||
"site": "trustpilot.com",
|
||||
"category": "reviews",
|
||||
"icon": "\u2b50",
|
||||
"schema": {
|
||||
"name": "trustpilot_reviews",
|
||||
"base_selector": ".styles_reviewCard",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": ".typography_heading-s",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"selector": ".typography_body-l",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "img[alt*='stars']",
|
||||
"type": "attribute",
|
||||
"attribute": "alt"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": ".typography_heading-xxs",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": ".styles_reviewCard",
|
||||
"type": "count"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.trustpilot.com/*"
|
||||
}
|
||||
21
templates/twitter-profile.json
Normal file
21
templates/twitter-profile.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Twitter/X Profile",
|
||||
"description": "Extract profile information from Twitter/X profiles",
|
||||
"site": "twitter.com",
|
||||
"category": "social",
|
||||
"icon": "🐦",
|
||||
"url_pattern": "*://twitter.com/*",
|
||||
"schema": {
|
||||
"name": "twitter_profile",
|
||||
"base_selector": "[data-testid='primaryColumn']",
|
||||
"fields": [
|
||||
{"name": "display_name", "selector": "[data-testid='UserName']", "type": "text"},
|
||||
{"name": "bio", "selector": "[data-testid='UserDescription']", "type": "text"},
|
||||
{"name": "followers", "selector": "a[href*='/followers'] span", "type": "text", "transform": "int"},
|
||||
{"name": "following", "selector": "a[href*='/following'] span", "type": "text", "transform": "int"},
|
||||
{"name": "location", "selector": "[data-testid='UserProfileHeader_Items']", "type": "text"},
|
||||
{"name": "website", "selector": "[data-testid='UserProfileHeader_Items'] a", "type": "attribute", "attribute": "href"},
|
||||
{"name": "avatar", "selector": "img[alt*='avatar']", "type": "attribute", "attribute": "src"}
|
||||
]
|
||||
}
|
||||
}
|
||||
63
templates/ulta-product.json
Normal file
63
templates/ulta-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Ulta Product",
|
||||
"description": "Extract product details from Ulta Beauty",
|
||||
"site": "ulta.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc84",
|
||||
"schema": {
|
||||
"name": "ulta_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1, [class*='product-name']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='reviews']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img, .product-image img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "shade_count",
|
||||
"selector": "[class*='shade']",
|
||||
"type": "count"
|
||||
},
|
||||
{
|
||||
"name": "in_store_only",
|
||||
"selector": "[class*='store']",
|
||||
"type": "exists"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.ulta.com/*"
|
||||
}
|
||||
41
templates/usatoday-article.json
Normal file
41
templates/usatoday-article.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "USA Today Article",
|
||||
"description": "Extract article content from USA Today",
|
||||
"site": "usatoday.com",
|
||||
"category": "news",
|
||||
"icon": "\ud83d\udcf0",
|
||||
"schema": {
|
||||
"name": "usatoday_article",
|
||||
"base_selector": "article, .story",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"selector": "[class*='author'], [class*='byline']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"selector": "time",
|
||||
"type": "attribute",
|
||||
"attribute": "datetime"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"selector": "[class*='content'], [class*='story-text']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "figure img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.usatoday.com/*"
|
||||
}
|
||||
39
templates/uspto-patent.json
Normal file
39
templates/uspto-patent.json
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"name": "USPTO Patent",
|
||||
"description": "Extract patent data from USPTO",
|
||||
"site": "uspto.gov",
|
||||
"category": "reference",
|
||||
"icon": "\ud83d\udcdc",
|
||||
"schema": {
|
||||
"name": "uspto_patent",
|
||||
"base_selector": "body",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "patent_number",
|
||||
"selector": "[class*='patent-number']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "inventors",
|
||||
"selector": "[class*='inventors']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "filing_date",
|
||||
"selector": "[class*='filing-date']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "abstract",
|
||||
"selector": ".abstract",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.uspto.gov/*"
|
||||
}
|
||||
78
templates/validate_templates.py
Normal file
78
templates/validate_templates.py
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
"""Validate all scraper templates — verify JSON schema, required fields, and selector structure.
|
||||
This ensures every template is structurally correct before we claim it works."""
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
TEMPLATES_DIR = Path(__file__).parent
|
||||
REQUIRED_KEYS = ["name", "description", "site", "category", "icon", "schema"]
|
||||
REQUIRED_SCHEMA_KEYS = ["name", "base_selector", "fields"]
|
||||
REQUIRED_FIELD_KEYS = ["name", "selector", "type"]
|
||||
VALID_TYPES = {"text", "attribute", "html", "nested", "count", "exists", "regex"}
|
||||
VALID_TRANSFORMS = {"strip_currency", "lower", "upper", "strip", "int", "float", ""}
|
||||
|
||||
|
||||
def validate_template(path: Path) -> list[str]:
|
||||
errors = []
|
||||
try:
|
||||
data = json.loads(path.read_text())
|
||||
except json.JSONDecodeError as e:
|
||||
return [f"Invalid JSON: {e}"]
|
||||
|
||||
for key in REQUIRED_KEYS:
|
||||
if key not in data:
|
||||
errors.append(f"Missing required key: {key}")
|
||||
|
||||
schema = data.get("schema", {})
|
||||
for key in REQUIRED_SCHEMA_KEYS:
|
||||
if key not in schema:
|
||||
errors.append(f"Schema missing required key: {key}")
|
||||
|
||||
fields = schema.get("fields", [])
|
||||
if not fields:
|
||||
errors.append("Schema has no fields")
|
||||
|
||||
for i, field in enumerate(fields):
|
||||
for key in REQUIRED_FIELD_KEYS:
|
||||
if key not in field:
|
||||
errors.append(f"Field {i} missing required key: {key}")
|
||||
ftype = field.get("type", "")
|
||||
if ftype and ftype not in VALID_TYPES:
|
||||
errors.append(f"Field {i} invalid type: {ftype}")
|
||||
transform = field.get("transform", "")
|
||||
if transform and transform not in VALID_TRANSFORMS:
|
||||
errors.append(f"Field {i} invalid transform: {transform}")
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
def main() -> int:
|
||||
all_errors = {}
|
||||
total = 0
|
||||
valid = 0
|
||||
|
||||
for path in sorted(TEMPLATES_DIR.glob("*.json")):
|
||||
if path.name == "validate_templates.py":
|
||||
continue
|
||||
total += 1
|
||||
errors = validate_template(path)
|
||||
if errors:
|
||||
all_errors[path.name] = errors
|
||||
else:
|
||||
valid += 1
|
||||
|
||||
if all_errors:
|
||||
for name, errors in all_errors.items():
|
||||
print(f"❌ {name}:")
|
||||
for e in errors:
|
||||
print(f" - {e}")
|
||||
print(f"\n{valid}/{total} templates valid, {len(all_errors)} failed")
|
||||
return 1
|
||||
else:
|
||||
print(f"✅ All {total} templates valid!")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
63
templates/walgreens-product.json
Normal file
63
templates/walgreens-product.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "Walgreens Product",
|
||||
"description": "Extract product details from Walgreens",
|
||||
"site": "walgreens.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\udc8a",
|
||||
"schema": {
|
||||
"name": "walgreens_product",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating']",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"selector": "[class*='size']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "in_store",
|
||||
"selector": "[class*='store']",
|
||||
"type": "exists"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.walgreens.com/*"
|
||||
}
|
||||
68
templates/walmart-grocery-product.json
Normal file
68
templates/walmart-grocery-product.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "Walmart Grocery Product",
|
||||
"description": "Extract grocery product details from Walmart",
|
||||
"site": "walmart.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "\ud83d\uded2",
|
||||
"schema": {
|
||||
"name": "walmart_grocery",
|
||||
"base_selector": ".product-detail",
|
||||
"fields": [
|
||||
{
|
||||
"name": "title",
|
||||
"selector": "h1",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"selector": "[class*='price']",
|
||||
"type": "text",
|
||||
"transform": "float"
|
||||
},
|
||||
{
|
||||
"name": "unit_price",
|
||||
"selector": "[class*='unit']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "rating",
|
||||
"selector": "[class*='rating'], .stars",
|
||||
"type": "attribute",
|
||||
"attribute": "aria-label"
|
||||
},
|
||||
{
|
||||
"name": "review_count",
|
||||
"selector": "[class*='review']",
|
||||
"type": "text",
|
||||
"transform": "int"
|
||||
},
|
||||
{
|
||||
"name": "brand",
|
||||
"selector": "[class*='brand']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"selector": "[class*='description']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"selector": "[class*='image'] img",
|
||||
"type": "attribute",
|
||||
"attribute": "src"
|
||||
},
|
||||
{
|
||||
"name": "nutrition",
|
||||
"selector": "[class*='nutrition']",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "pickup_available",
|
||||
"selector": "[class*='pickup']",
|
||||
"type": "exists"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url_pattern": "*://www.walmart.com/*"
|
||||
}
|
||||
21
templates/walmart-product.json
Normal file
21
templates/walmart-product.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Walmart Product",
|
||||
"description": "Extract product details from Walmart product pages",
|
||||
"site": "walmart.com",
|
||||
"category": "ecommerce",
|
||||
"icon": "🛒",
|
||||
"url_pattern": "*://www.walmart.com/ip/*",
|
||||
"schema": {
|
||||
"name": "walmart_product",
|
||||
"base_selector": ".prod-ProductHero",
|
||||
"fields": [
|
||||
{"name": "title", "selector": "h1", "type": "text"},
|
||||
{"name": "price", "selector": "[itemprop='price']", "type": "text", "transform": "float"},
|
||||
{"name": "rating", "selector": ".rating-stars-group", "type": "attribute", "attribute": "aria-label", "transform": "float"},
|
||||
{"name": "review_count", "selector": ".rating-reviews", "type": "text", "transform": "int"},
|
||||
{"name": "description", "selector": ".about-desc", "type": "text"},
|
||||
{"name": "image_url", "selector": ".prod-hero-hero-image img", "type": "attribute", "attribute": "src"},
|
||||
{"name": "availability", "selector": ".fulfillment-shippingMethod", "type": "text"}
|
||||
]
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue