{"id":"1688-product-detail","name":"1688-product-detail","summary":"1688.com 製品詳細ページから包括的な卸売商品データを抽出します:タイトル、階層価格、サイズ/重量付きSKUバリエーション、商品画像、販売者情報、ショップスコア、購入者保護、国境を越えたフラグ、商品属性、クーポン/プロモーションデータ、レビュー統計など。","body":"# 1688.com — Product Detail Extraction\n\n> Navigate to a 1688 product page → extract 50+ fields including pricing tiers, SKU variants, seller stats, attributes, promotions\n\n## Language\n\nAll process output to user (progress updates, process notifications) follows the user's language.\n\n## Objective\n\nExtract complete wholesale product data from a 1688.com offer detail page using embedded page data and network capture for supplier metrics.\n\n## Prerequisites\n\n- Target product detail page is open in the browser: `https://detail.1688.com/offer/{offer_id}.html`\n- No login required for product detail pages (data is publicly accessible)\n\n## Pre-execution Checks\n\n### 1. Tool Readiness\n\nIf browser-act has been confirmed available in the current session → skip this step.\n\nInvoke `browser-act` via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.\n\n## Capability Components\n\n> This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the user on the page, never bypassing authentication or access controls. JS code is encapsulated in Python files under the `scripts/` directory, invoked via `eval \"$(python scripts/xxx.py {params})\"`. `$(...)` is bash syntax; it is recommended to use the bash tool for execution.\n\n### DOM: Extract core product data (title, pricing, images, seller, flags)\n\nAfter navigating to the product page and waiting for page load:\n\n`eval \"$(python scripts/extract-product-detail.py '{offer_id}')\"`\n\nParameters:\n- offer_id: Numeric 1688 offer/product ID (e.g., `927875250705`)\n\nOutput example:\n```json\n{\n  \"offerId\": \"927875250705\",\n  \"title\": \"新款苹果18promax手机壳磁吸...\",\n  \"unit\": \"个\",\n  \"category\": { \"topCategoryId\": 7, \"postCategoryId\": 132918005 },\n  \"pricing\": {\n    \"tiers\": [\n      { \"minQty\": \"30\", \"price\": \"7.99\" },\n      { \"minQty\": \"100\", \"price\": \"7.79\" }\n    ],\n    \"priceDisplayType\": \"range\",\n    \"minOrderQty\": 30,\n    \"currency\": \"CNY\"\n  },\n  \"sales\": {\n    \"totalSold\": 308417,\n    \"displaySaleNum\": \"10万+\",\n    \"saleCountLabel\": \"全网销量\"\n  },\n  \"images\": [\"https://cbu01.alicdn.com/img/ibank/...jpg\"],\n  \"attributes\": {\n    \"材质\": \"优质TPU\",\n    \"款式\": \"后盖款\",\n    \"功能\": \"防震,磁吸,防磨,防摔\",\n    \"适用型号\": \"iPhone17,iphone17pro...\"\n  },\n  \"skuCount\": 339,\n  \"skuWeightData\": [\n    { \"weight\": 40, \"length\": 17, \"width\": 7, \"height\": 1, \"volume\": 119 }\n  ],\n  \"seller\": {\n    \"companyName\": \"佛山市南海区三丰手机配件有限公司\",\n    \"loginId\": \"fssf06\",\n    \"memberId\": \"b2b-2850655109d72ea\",\n    \"userId\": 2850655109,\n    \"shopUrl\": \"https://shop1460393846166.1688.com\",\n    \"cardType\": \"cjgc\",\n    \"isPmPlus\": true,\n    \"serviceScore\": \"4.5分\",\n    \"buyerRepeatRate\": \"65.82%\"\n  },\n  \"offerFlags\": {\n    \"isSkuOffer\": true,\n    \"isPreSell\": false,\n    \"isConsignMarketOffer\": true,\n    \"isDistribution\": true,\n    \"isChtOffer\": true,\n    \"isBuyerProtection\": true\n  },\n  \"crossBorder\": {\n    \"foreignLanguagePackageAvailable\": true,\n    \"boxMarkAvailable\": true,\n    \"fbaLabelAvailable\": true\n  },\n  \"guarantees\": [\"买家保障\", \"正品保障\"],\n  \"descriptionUrl\": \"https://detail.1688.com/...\",\n  \"offerMemberTags\": [4336705, 519170],\n  \"sellerWinportUrlMap\": {}\n}\n```\n\n### DOM: Extract SKU variants (color/model combinations with weight/dimensions)\n\n`eval \"$(python scripts/extract-sku-details.py '{offer_id}')\"`\n\nParameters:\n- offer_id: Numeric 1688 offer/product ID\n\nOutput example:\n```json\n{\n  \"offerId\": \"927875250705\",\n  \"skuCount\": 339,\n  \"skuRangePrices\": [\n    { \"price\": \"7.99\", \"beginAmount\": \"30\" },\n    { \"price\": \"7.79\", \"beginAmount\": \"100\" }\n  ],\n  \"skus\": [\n    {\n      \"skuId\": 5833485852524,\n      \"specId\": \"...\",\n      \"attrs\": { \"颜色\": \"黑色\", \"适用型号\": \"iPhone17\" },\n      \"saleCount\": 0,\n      \"canBookCount\": 9999,\n      \"isPromotionSku\": false,\n      \"packInfo\": { \"weight\": 40, \"length\": 17, \"width\": 7, \"height\": 1, \"volume\": 119 }\n    }\n  ],\n  \"skuImageMap\": {}\n}\n```\n\n### DOM: Extract coupon and promotion data\n\n`eval \"$(python scripts/extract-promotions.py '{offer_id}')\"`\n\nParameters:\n- offer_id: Numeric 1688 offer/product ID\n\nOutput example:\n```json\n{\n  \"offerId\": \"927875250705\",\n  \"coupons\": [\n    { \"couponType\": \"INTERACT\", \"couponContent\": \"满100减5券\" }\n  ],\n  \"promotionModel\": {\n    \"buttonName\": \"领券\",\n    \"promotionList\": [\n      {\n        \"type\": \"INTERACT\",\n        \"name\": \"互动优惠券\",\n        \"summary\": \"入会有礼券\",\n        \"promotionItems\": [\n          {\n            \"label\": \"满100减5券\",\n            \"availablePeriod\": \"有效期：2026.05.28 00:00:00-2026.11.24 23:59:59\",\n            \"canApply\": true\n          }\n        ]\n      }\n    ]\n  },\n  \"activity\": {\n    \"activityType\": null,\n    \"activityName\": null,\n    \"activityUrl\": null,\n    \"countdown\": null,\n    \"activityId\": null\n  },\n  \"bannerImage\": \"\"\n}\n```\n\n### DOM: Extract seller params (for shopcard network capture)\n\n`eval \"$(python scripts/extract-seller-params.py '{offer_id}')\"`\n\nParameters:\n- offer_id: Numeric 1688 offer/product ID\n\nOutput example:\n```json\n{\n  \"offerId\": \"927875250705\",\n  \"seller\": {\n    \"companyName\": \"佛山市南海区三丰手机配件有限公司\",\n    \"loginId\": \"fssf06\",\n    \"memberId\": \"b2b-2850655109d72ea\",\n    \"userId\": 2850655109,\n    \"shopUrl\": \"https://shop1460393846166.1688.com\",\n    \"cardType\": \"cjgc\",\n    \"serviceScore\": \"4.5分\",\n    \"buyerRepeatRate3m\": \"65.82%\"\n  },\n  \"shopcardParams\": {\n    \"offerId\": \"927875250705\",\n    \"userId\": 0,\n    \"offerMemberTags\": [4336705, 519170, \"...\"],\n    \"sellerUserId\": 2850655109,\n    \"sellerMemberId\": \"b2b-2850655109d72ea\",\n    \"topCategoryId\": 7,\n    \"offerModelSign\": { \"isBuyerProtection\": true, \"isDistribution\": true },\n    \"sellerIdentity\": \"cjgc\",\n    \"sellerWinportUrlMap\": { \"indexUrl\": \"...\", \"defaultUrl\": \"...\" },\n    \"winportUrl\": \"https://shop1460393846166.1688.com\"\n  }\n}\n```\n\n### Network Capture: Get shop scores and metrics (shopcard API)\n\nThe shopcard API uses dynamic `sign` tokens — let the page JS handle it, read from network traffic.\n\nAfter the product detail page loads fully (wait stable), the shopcard request fires automatically:\n\n1. `wait stable`\n2. `network requests --type xhr,fetch --filter h5api.m.1688.com`\n3. Find request with URL containing `mtop.1688.moga.pc.shopcard`\n4. `network request <id>`\n\nEndpoint characteristic: URL contains `mtop.1688.moga.pc.shopcard`\n\nIf the shopcard request is not in traffic (navigated away or cleared), reload the product page:\n1. `navigate https://detail.1688.com/offer/{offer_id}.html`\n2. `wait stable`\n3. Repeat steps 2–4 above\n\nError handling: If request not found after page reload, check if the product page loaded correctly (screenshot), then retry once. If still unavailable, shopcard data is unavailable for this offer.\n\nOutput example:\n```json\n{\n  \"api\": \"mtop.1688.moga.pc.shopcard\",\n  \"data\": {\n    \"model\": {\n      \"shopName\": \"佛山市南海区三丰手机配件有限公司\",\n      \"shopType\": \"cjgc\",\n      \"iconType\": \"cjgc\",\n      \"mainCategoryName\": \"手机配件\",\n      \"shopUrl\": \"https://shop1460393846166.1688.com\",\n      \"tpYear\": 11,\n      \"shopData\": [\n        { \"dataKey\": \"店铺回头率\", \"dataValue\": \"66%\" },\n        { \"dataKey\": \"店铺服务分\", \"dataValue\": \"4.5\", \"unit\": \"分\" },\n        { \"dataKey\": \"准时发货率\", \"dataValue\": \"- %\" },\n        { \"dataKey\": \"店铺好评率\", \"dataValue\": \"99.9%\" }\n      ],\n      \"shopButton\": {\n        \"fuzzyFavCount\": \"8.6k粉丝\",\n        \"attentionRelation\": false\n      }\n    }\n  }\n}\n```\n\n### Network Capture: Get DSR review summary (queryDsrRateDataV2 API)\n\nAfter page load, the DSR scores request fires automatically alongside shopcard:\n\n1. `wait stable`\n2. `network requests --type xhr,fetch --filter h5api.m.1688.com`\n3. Find request with URL containing `querydsrratedatav2`\n4. `network request <id>`\n\nEndpoint characteristic: URL contains `mtoprateservice.querydsrratedatav2`\n\nError handling: Same as shopcard — if not found, navigate to the product page and retry. The DSR API fires with the POST param `loginId` = seller loginId and `offerId`; both come from `extract-seller-params.py` output.\n\nOutput example:\n```json\n{\n  \"data\": {\n    \"model\": {\n      \"goodRates\": 99.9,\n      \"goodsGrade\": 5.0,\n      \"fulfillmentDataList\": [\n        { \"name\": \"商品好评\", \"value\": \"100%\" },\n        { \"name\": \"按时发货\" },\n        { \"name\": \"商品退款\" }\n      ],\n      \"commonTagNodeList\": [\n        { \"name\": \"全部\", \"count\": 2497 },\n        { \"name\": \"有图\", \"count\": 6 },\n        { \"name\": \"好评\", \"count\": 2494 }\n      ],\n      \"impressionTagNodeList\": [\n        { \"name\": \"价格很便宜\", \"count\": 6 },\n        { \"name\": \"质量很好\", \"count\": 5 }\n      ]\n    }\n  }\n}\n```\n\n### Composite: Full product data extraction\n\nCombines DOM extraction with network capture for complete data. For each offer ID:\n\n1. `navigate https://detail.1688.com/offer/{offer_id}.html`\n2. `wait stable`\n3. `eval \"$(python scripts/extract-product-detail.py '{offer_id}')\"` → core data\n4. `eval \"$(python scripts/extract-sku-details.py '{offer_id}')\"` → SKU variants\n5. `eval \"$(python scripts/extract-promotions.py '{offer_id}')\"` → coupons/activity\n6. `network requests --type xhr,fetch --filter h5api.m.1688.com` → locate shopcard and DSR requests\n7. `network request <shopcard_request_id>` → shop scores\n8. `network request <dsr_request_id>` → review stats\n9. Merge all results by offerId\n\n## Enum Parameters\n\nshop type [collection failed]: `cardType` values (e.g., `cjgc`, `cht`) come from page data but no separate enumeration API found; values depend on seller registration type\n\n## Pagination\n\nNot applicable — this is a single-product detail extraction capability. For bulk processing, see Execution Efficiency below.\n\n## Success Criteria\n\n`extract-product-detail.py` output has no `error` field AND `title` is non-null AND `pricing.tiers` length >= 1\n\n## Known Limitations\n\n- Search functionality (`s.1688.com`) requires login/CN IP — this Skill covers detail pages only (publicly accessible by offer ID)\n- Shopcard API (`mtop.1688.moga.pc.shopcard`) may return empty `shopData` for some offer types or if the session has expired; navigate to the product page to refresh\n- `productAttributes` DOM module has a server-side rendering bug (JSONArray cast error in page metadata) — attributes are extracted from DOM fallback selectors instead\n- `freightInfo.totalCost` (shipping cost) comes from the freight API which requires `sendAddressCode` and `receiveAddressCode`; defaults to sender's registered address; not included in composite extraction due to address dependency\n- Review list detail (`queryItemRatedListV2`) returns paginated individual reviews but is not included in composite — use the DSR summary instead\n\n## Execution Efficiency\n\n- **Batch orchestration**: Write a bash script to loop through offer IDs serially within a single session; do not parallelize within one browser (prone to triggering anti-scraping restrictions). Add 2–3 second intervals between products. To increase throughput, open multiple stealth browser sessions and distribute offers across them.\n- **Test before batch execution**: After writing a batch script, first test with 1–2 offer IDs to verify script runs correctly; only then run the full batch.\n- **Reduce redundant pre-operations**: When processing multiple offers, keep the session open; don't re-launch browser-act for each offer.\n- **Error resumption**: Save results item by item during batch processing; on failure, resume from the breakpoint rather than starting over.\n\n## Experience Notes\n\nPath: `{working_directory}/browser-act-skill-forge-memories/1688-wholesale-scraper-1688-product-detail.memory.md` (working directory is determined by the Agent running the Skill, typically the project root or current working directory)\n\n**Before execution**: If the file exists, read it first — it records unexpected situations encountered during past executions (e.g., a strategy has become ineffective); adjust strategy order accordingly.\n\n**After execution**: If an unexpected situation is encountered (strategy became ineffective, page redesigned, anti-scraping upgraded, better path discovered), append a line:\n`{YYYY-MM-DD}: {what happened} → {conclusion}`\n\nNormal execution does not write to the file. Do not record what keywords were used or how many results were returned — those are task outputs, not experience.","author":"@browser-act","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/browser-act/skills/tree/main/solutions/ecommerce/1688-product-detail","license":"MIT","category":"coding","lang":"en","tokens":3396,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"scripts/extract-product-detail.py","size":5603,"sha256":"5ad3bc5c0103a62928adb81e1d9d5b89df729de3bcbe1d2505c3ba8eb4ee69eb"},{"path":"scripts/extract-promotions.py","size":1999,"sha256":"0235eca33ab62c8f2d659546da6539af2ea3da071347c4986c50a1ed4b2d5391"},{"path":"scripts/extract-seller-params.py","size":3244,"sha256":"454bad7d1c0b644196c22ef093a7cd39cfaccf01b3ef70ec82267b1c41887404"},{"path":"scripts/extract-sku-details.py","size":3361,"sha256":"e70794f2710d07dd4e746035338fc34a8256f913dab3418bb4fba286c687698e"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[{"code":"net.endpoints","kind":"exfiltration","excerpt":"cbu01.alicdn.com, detail.1688.com, shop1460393846166.1688.com","message":"bundled scripts reach 3 external host(s)","severity":"warn"}],"scannedAt":"2026-08-22","hasScripts":true,"networkEndpoints":["cbu01.alicdn.com","detail.1688.com","shop1460393846166.1688.com"]}}