← 返回
未分类

Car Specs Crawler

Fetch car specifications from Chinese automotive websites (懂车帝 dongchedi.com and 汽车之家 autohome.com.cn). Use when the user needs to collect vehicle configurat...
从懂车帝(dongchedi.com)和汽车之家(autohome.com.cn)等中国汽车网站获取汽车规格信息,适用于用户需要收集车辆配置等数据时使用。
terrycarter1985 terrycarter1985 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 219
下载
💾 0
安装
1
版本
#latest

概述

Car Specs Crawler

Overview

This skill provides a Python script that crawls car specifications from major Chinese automotive websites (懂车帝, 汽车之家). It searches by car model name, extracts key parameters, and outputs them as JSON or markdown tables for use in comparison reports, PPTs, or spreadsheets.

Supported Parameters

The crawler extracts these common fields when available:

  • 价格 (Price / MSRP)
  • 能源类型 (Energy type: EV, PHEV, ICE, etc.)
  • 座位 (Seating layout)
  • 车身尺寸 (Dimensions L×W×H in mm)
  • 轴距 (Wheelbase)
  • 最高车速 (Top speed)
  • 电池容量 (Battery capacity in kWh)
  • 续航 (CLTC/NEDC/WLTP range in km)
  • 电机功率 (Motor power in kW)
  • 扭矩 (Torque in N·m)
  • 百公里加速 (0-100 km/h acceleration)
  • 充电时间 (Charging time)

Usage

Basic: Single Car

python3 scripts/fetch-car-specs.py "小米YU7 Pro"

Compare Multiple Cars

python3 scripts/fetch-car-specs.py "华为问界M7 纯电" "小米YU7 Pro" "特斯拉Model Y"

Output as JSON

python3 scripts/fetch-car-specs.py "小米YU7 Pro" --format json

Specify Source

# Only 懂车帝
python3 scripts/fetch-car-specs.py "小米YU7 Pro" --source dongchedi

# Only 汽车之家
python3 scripts/fetch-car-specs.py "小米YU7 Pro" --source autohome

Save to File

python3 scripts/fetch-car-specs.py "小米YU7 Pro" --format json --output specs.json

Integration Workflow (for PPT/Report Building)

When building a car comparison PPT or report:

  1. Run the crawler for each car model:

```bash

python3 scripts/fetch-car-specs.py "车型A" "车型B" --format table

```

  1. Parse the markdown table output and feed it into the report/PPT builder.
  1. Cross-check with official websites if critical specs are missing — the crawler falls back between sources automatically.

Notes

  • The script uses requests + lxml (standard packages, usually pre-installed).
  • If a source site changes its HTML structure, the XPath selectors may need updating.
  • Rate limiting: the script sleeps 0.5s between requests to be polite to the target sites.
  • Some fields may be missing if the source page does not display them.

Resources

scripts/fetch-car-specs.py

The main crawler script. Run directly with car model names as arguments.

references/xpath-patterns.md (optional)

If the target sites change their HTML structure, update the XPath selectors in this reference file, then patch the script accordingly.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-21 23:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Code Formatter

terrycarter1985
代码格式化最佳实践及常用语言(Python、JavaScript、JSON、Markdown 等)的快速参考,使用 Prettier、Black、ESLint 等工具。
★ 0 📥 798
data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 297 📥 142,026
data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 274 📥 100,985