mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
0f806e9473
* feat(dianping): browser adapter — search + shop on www.dianping.com Adds two browser-mode adapters for the dianping (大众点评) PC site: - `dianping search "<keyword>" --city <name|id> --limit <n>`: keyword shop/restaurant search. Returns rank, shop_id, name, rating, reviews, price, cuisine, district, url. shop_id round-trips into `dianping shop`. - `dianping shop <shop_id>` (alias `detail`): shop detail sheet (field/value rows: name, rating, breakdown 口味/环境/服务/食材, reviews, price, rank, hours, address, subway, features, url). Both use Strategy.COOKIE on www.dianping.com (the PC site renders search SSR and does not require JS hydration). m.dianping.com is intentionally crippled for non-mobile UAs, so it's not used. Auth detection (utils.detectAuthOrEmpty) inspects both response text and final URL for the Meituan Yoda captcha redirect (verify.meituan.com) and the dianping login redirect; raises AuthRequiredError with the captcha URL embedded so the user can clear it manually in the same profile. Listing↔detail id pairing: search.shop_id → shop.<id>. Adds 'shop' to DETAIL_NAMES in scripts/check-listing-id-pairing.mjs so the convention gate scans this site (35 sites / 78 listings now covered). * fix(dianping): harden browser failure classification * fix(dianping): fail on partial missing shop ids