360 Secure SkillHub
360 安全技能中心

Product Pricing Scraper

该 Skill 按商品名称或页面 URL,从 Amazon、eBay、Walmart 及通用商品页抓取价格,经去符号、单位价换算、折扣价记录后排序比较,给出最低/最高/均价/中位数,支持 JSON 或 CSV 输出;同时区分静态页与 JS 渲染页两种抓取方式,并附选择器参考与抓取脚本。

terrycarter1985
terrycarter1985
热度 43.00
最近更新 2026-05-11 17:41:24
分类:营销依赖:代码执行 / 联网浏览搜索 / 读写文件应用场景:购物 / 市场分析 / 数据处理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add product-pricing-scraper
Metadata
name
product-pricing-scraper
description
Scrape and compare product prices across e-commerce sites. Use when the user needs to extract pricing data, track price changes, compare prices across retailers, or monitor competitor pricing. Supports Amazon, eBay, Walmart, and generic product pages. Outputs structured JSON/CSV with price normalization and currency conversion.

Product Pricing Scraper

Scrape, normalize, and compare product prices across e-commerce sites.

Quick Start

"Compare prices for [product name] across Amazon, eBay, and Walmart"
"Scrape pricing from [URL]"
"Track price changes for [product]"

Workflow

  1. Identify target — accept product name (search across sites) or specific URL(s)
  2. Scrape — use scripts/scrape_prices.py for each target
  3. Normalize — strip currency symbols, unify units, convert currencies if needed
  4. Compare — rank by price, flag outliers, compute average/median
  5. Output — JSON or CSV via --format flag

Scraping Strategies

Static pages (most product listings)

Use web_fetch + cheerio-style parsing. No browser needed.

Dynamic pages (JS-rendered prices)

Use the browser tool with snapshot + act to navigate and extract.

Anti-bot considerations

  • Randomize delays (2-5s between requests)
  • Rotate User-Agent strings
  • Respect robots.txt — check before scraping
  • Limit concurrent requests per domain

Price Normalization

  • Strip currency symbols and whitespace
  • Convert per-unit pricing (e.g., "$2.99/oz" → unit price)
  • Handle price ranges (take lowest)
  • Flag "was/now" discounted prices — record both

Output Schema

{
  "query": "product name or url",
  "scraped_at": "ISO-8601",
  "results": [
    {
      "source": "amazon",
      "url": "https://...",
      "title": "Product Title",
      "price": 29.99,
      "currency": "USD",
      "unit_price": null,
      "original_price": 39.99,
      "in_stock": true,
      "rating": 4.5,
      "review_count": 1234
    }
  ],
  "summary": {
    "lowest": { "source": "amazon", "price": 29.99 },
    "highest": { "source": "walmart", "price": 34.99 },
    "average": 32.49,
    "median": 31.99
  }
}

Scripts

  • scripts/scrape_prices.py — main scraper: accepts product name or URL list, outputs structured JSON
  • See references/selectors.md for site-specific CSS selectors

Ethics & Compliance

  • Respect robots.txt and rate limits
  • Do not scrape behind login walls without explicit permission
  • Do not collect personal data
  • Check site ToS before bulk scraping