Files
Louie ee4820ef59 feat(adapters): add Chinese car-platform adapters — 懂车帝 / 瓜子二手车 / 汽车之家 (no-login) (#2009)
* feat(adapters): add 懂车帝 (dongchedi) + 瓜子二手车 (guazi) car adapters

Two no-login PUBLIC adapters for Chinese car platforms. Both read
server-rendered data (no cookies, no signature, no browser) and ship
pure parsers unit-tested against frozen real-data fixtures.

dongchedi (6 commands) — parses __NEXT_DATA__ SSR JSON:
  search  车系搜索 + 指导价/经销商价
  series  车系概览(品牌/价格/懂车分/销量排名/款型数)
  models  款型列表 + 价格
  specs   配置概览(尺寸/动力/四驱/悬挂/气囊)
  score   懂车分 8 维评分 + 同级对比
  koubei  车主口碑/评价正文
  (Dongchedi's /motor XHR APIs are ByteDance-signature gated; the SSR
   pages expose the same data unsigned, so the adapter reads those.)

guazi (2 commands) — parses m.guazi.com mobile SSR HTML:
  browse  分城市在售二手车列表(售价/里程/年份)
  car     车源详情(售价/上牌/里程/过户/配置/车况)
  (Desktop www.guazi.com is signature-locked; mobile SSR is open. Deep
   pagination/filtering uses the signed API and is intentionally omitted.)

Gates green: tsc, doc-coverage --strict, silent-column-drop (new=0),
typed-error-lint (no new), 24 adapter tests passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(adapters): add 汽车之家 (autohome) — brand catalog + 口碑 ratings

Third no-login PUBLIC car adapter (search by brand, not free text).

autohome (2 commands):
  brand  按品牌列出全部车系 + 厂商指导价(grade/carhtml/<INITIAL>.html,
         中文品牌名→拼音首字母目录页,DL 块按品牌定位)
  score  车系口碑评分:总分 + 各维度 + 故障率PPH + 竞品对比
         (k.autohome.com.cn/<id> 的 __NEXT_DATA__.baseData,免登录免签名)

Deliberately omitted (would be silently-wrong without a browser running
Autohome's signing/anti-scrape code): free-text keyword search (signature
gated) and full per-trim 参数配置 (rotating CSS font-glyph obfuscation).
Use dongchedi search/specs/koubei for those. Documented in the adapter doc.

Gates green: tsc, doc-coverage --strict (170/170), silent-column-drop
(new=0), typed-error-lint (no new); 31 adapter tests passing across the
three car adapters.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(car-adapters): fail closed on parser drift

* fix(guazi): fail closed on empty SSR listings

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-06-24 06:07:01 +08:00

2.5 KiB

瓜子二手车 Guazi

Mode: 🌐 Public · Domain: guazi.com

No login, no cookies, no signature. Reads the mobile site m.guazi.com, which server-renders the full listing list and car detail into the HTML (the desktop www.guazi.com SPA loads data from a signature-locked API and is not usable from a plain HTTP client).

Commands

Command Description
opencli guazi browse [city] Used cars for sale in a city → price / mileage / year
opencli guazi car <clue_id> One listing's detail → price, registration, mileage, specs, condition

car takes a clue_id — get one from browse (the clue_id column) or paste a https://m.guazi.com/car-detail/c<id>.html URL.

Usage Examples

# Browse listings (defaults to Beijing)
opencli guazi browse
opencli guazi browse 上海 --limit 30
opencli guazi browse sz            # city code also works

# One listing in detail
opencli guazi car 168029452296957
opencli guazi car https://m.guazi.com/car-detail/c168029452296957.html

# JSON output
opencli guazi browse 北京 -f json

Output Columns

Command Columns
browse rank, clue_id, title, price, down_payment, mileage, year, city, url
car field, value (clue_id, title, tag, price, reg_date, mileage, transfers, source_city, color, engine, gearbox, drivetrain, emission, condition, listing_no, url)

Cities

Pass a Chinese city name or a Guazi city code. Known names: 北京(bj), 上海(sh), 广州(gz), 深圳(sz), 杭州(hz), 成都(cd), 重庆(cq), 南京(nj), 武汉(wh), 天津(tj), 西安(xa), 苏州(su), 郑州(zz), 长沙(cs), 青岛(qd), 沈阳(sy), 大连(dl), 济南(jn), 合肥(hf), 佛山(fs). Any two/three-letter code is passed through as-is, so other cities work by code too.

Notes & Limits

  • First SSR page only. Deep pagination and brand/keyword filtering route through Guazi's signed mapi.guazi.com API, so browse returns the first server-rendered page (~40 fresh listings) per city. Listings rotate, so re-running surfaces new cars rather than the same page.
  • Condition is a summary, not the full inspection checklist (基础车况 + accident/transfer flags). The full 检测报告 sits behind the signed API and is intentionally not faked.
  • If Guazi ever pushes the mobile pages behind their anti-bot challenge, the commands fail loudly with an auth-required error rather than returning blanks.

Prerequisites

None — public site, no authentication required.