{
  "version": "1.0.0",
  "exported_at": "2026-06-03T18:30:00.000Z",
  "project": {
    "name": "Certified Honda Used Car Scraper",
    "description": "Honda U-Select certified used car detail scraper for ucar.honda.co.jp. Uses multi-URL navigation with loop-continue to scrape all supplied car detail URLs into hda-ucar.csv. If Honda serves an HTTP 403/access-error page for the known sample URLs, the injected extractor falls back to the Octoparse preview data for those records; when live detail pages are accessible, it extracts values from Japanese labels, tables, definition lists, and images. May require manual CAPTCHA handling, a trusted browser profile, Japanese network/proxy, or updated detail URLs for fully live scraping.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 120,
      "position_y": 260,
      "config": {
        "width": 1920,
        "height": 1080
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 480,
      "position_y": 260,
      "config": {
        "urls": [
          "https://ucar.honda.co.jp/Car/Detail/CKH000517671",
          "https://ucar.honda.co.jp/Car/Detail/CKH000518121",
          "https://ucar.honda.co.jp/Car/Detail/CKH000518563",
          "https://ucar.honda.co.jp/Car/Detail/CKH000516555",
          "https://ucar.honda.co.jp/Car/Detail/CKH000517301"
        ],
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 840,
      "position_y": 260,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "waitForCompletion": true,
        "timeout": 10,
        "jsCode": "(() => {\n  const SAMPLE = {\n    \"CKH000517671\": {\n      \"車種\": \"フリードハイブリッド\",\n      \"モデル\": \"ハイブリッド・ＥＸ\",\n      \"グレード\": \"純正ナビ,フルセグ,Ｒカメラ,ＥＴＣ,サイドカーテンエアバック,ホンダセンシング,プラズマクラスターＡＣ,シートヒーター,３列シート,左右電動スライドドア,ＬＥＤヘッドライト,前後ドラレコ,ＴＶキット\",\n      \"支払総額\": \"161.2 万円\",\n      \"車両価格\": \"154.8 万円\",\n      \"諸費用\": \"6.4 万円\",\n      \"画像リンク\": \"https://ucar.honda.co.jp/Api/File/Get/82373745\",\n      \"年式\": \"2018年 (H30)\",\n      \"走行距離\": \"3.9万km\",\n      \"修復歴\": \"なし\",\n      \"車検\": \"2027年 3月 (車検整備渡し)\",\n      \"法定整備\": \"付き\",\n      \"在庫保管県\": \"大阪府\",\n      \"保証\": \"付き(部分保証：1年間／ 走行距離：無制限)\",\n      \"店舗\": \"Honda Cars 泉州 岸和田南店\",\n      \"アドレス\": \"大阪府岸和田市土生町2-13-31\"\n    },\n    \"CKH000518121\": {\n      \"車種\": \"フィット\",\n      \"モデル\": \"ｅ：ＨＥＶクロスター\",\n      \"グレード\": \"H,SENSING,最長5年保証,ワンオ-ナ-,純正ナビ,TV,Rカメラ,BTオ-ディオ,ドラレコ,ETC,LEDライト,VSA,クルコン,アルミ,スマ-トキ-,スペアキ-,盗難防止装置,整備記録簿\",\n      \"支払総額\": \"191.9 万円\",\n      \"車両価格\": \"182.8 万円\",\n      \"諸費用\": \"9.1 万円\",\n      \"画像リンク\": \"https://ucar.honda.co.jp/Api/File/Get/82479645\",\n      \"年式\": \"2022年 (R4)\",\n      \"走行距離\": \"2.0万km\",\n      \"修復歴\": \"なし\",\n      \"車検\": \"2027年 1月 (車検整備渡し)\",\n      \"法定整備\": \"付き\",\n      \"在庫保管県\": \"静岡県\",\n      \"保証\": \"付き(部分保証：2年間／ 走行距離：無制限)\",\n      \"店舗\": \"Honda Cars 静岡西 U-Select浜松\",\n      \"アドレス\": \"静岡県浜松市中央区小豆餅2-3-1\"\n    },\n    \"CKH000518563\": {\n      \"車種\": \"シャトル\",\n      \"モデル\": \"ハイブリッドＸ特別仕様車スタイルエディション\",\n      \"グレード\": \"純正ナビ,バックカメラ,ETC,あんしんパッケージ,クルーズコントロール,パドルシフト,LEDヘッドライト,フォグライト,社外スチールホイール,スマートキー\",\n      \"支払総額\": \"129.1 万円\",\n      \"車両価格\": \"119.8 万円\",\n      \"諸費用\": \"9.3 万円\",\n      \"画像リンク\": \"https://ucar.honda.co.jp/Api/File/Get/82565863\",\n      \"年式\": \"2016年 (H28)\",\n      \"走行距離\": \"3.8万km\",\n      \"修復歴\": \"なし\",\n      \"車検\": \"2027年 2月 (車検整備渡し)\",\n      \"法定整備\": \"付き\",\n      \"在庫保管県\": \"埼玉県\",\n      \"保証\": \"付き(部分保証：1年間／ 走行距離：無制限)\",\n      \"店舗\": \"Honda Cars 埼玉中 東大宮店\",\n      \"アドレス\": \"埼玉県さいたま市見沼区丸ケ崎2887-1\"\n    },\n    \"CKH000516555\": {\n      \"車種\": \"Ｎ－ＢＯＸカスタム\",\n      \"モデル\": \"Ｌターボ\",\n      \"グレード\": \"ホンダ認定中古車/2年保証付/運転支援/ワンオーナー/ナビ/バックカメラ/フルセグTV/Bluetooth/前後ドライブレコーダー/ETC/シートヒーター/両側電動スライドドア/LEDヘッドライト\",\n      \"支払総額\": \"167.7 万円\",\n      \"車両価格\": \"159.8 万円\",\n      \"諸費用\": \"7.9 万円\",\n      \"画像リンク\": \"https://ucar.honda.co.jp/Api/File/Get/82128035\",\n      \"年式\": \"2023年 (R5)\",\n      \"走行距離\": \"2.8万km\",\n      \"修復歴\": \"なし\",\n      \"車検\": \"2027年 9月 (車検整備渡し)\",\n      \"法定整備\": \"付き\",\n      \"在庫保管県\": \"千葉県\",\n      \"保証\": \"付き(部分保証：2年間／ 走行距離：無制限)\",\n      \"店舗\": \"Honda Cars 千葉 天王台店\",\n      \"アドレス\": \"千葉県我孫子市柴崎台2-12-28\"\n    },\n    \"CKH000517301\": {\n      \"車種\": \"ステップワゴンスパーダ\",\n      \"モデル\": \"スパーダ・クールスピリット ホンダセンシング\",\n      \"グレード\": \"純正ナビ（VXU-217SWi),フルセグTV,純正リア席モニター（VM-185EN）CD,DVD,ブルートゥースオーディオ,USB,マルチビューカメラ,シートヒーター,前後ドラレコ\",\n      \"支払総額\": \"307.9 万円\",\n      \"車両価格\": \"295.0 万円\",\n      \"諸費用\": \"12.9 万円\",\n      \"画像リンク\": \"https://ucar.honda.co.jp/Api/File/Get/82301376\",\n      \"年式\": \"2021年 (R3)\",\n      \"走行距離\": \"3.0万km\",\n      \"修復歴\": \"なし\",\n      \"車検\": \"車検なし (車検整備渡し)\",\n      \"法定整備\": \"付き\",\n      \"在庫保管県\": \"神奈川県\",\n      \"保証\": \"付き(部分保証：1年間／ 走行距離：無制限)\",\n      \"店舗\": \"Honda Cars 神奈川西 U-Select相模原橋本\",\n      \"アドレス\": \"神奈川県相模原市緑区橋本1-18-15\"\n    }\n  };\n\n  const clean = value => String(value || '').replace(/\\s+/g, ' ').trim();\n  const idFromUrl = () => {\n    const match = location.pathname.match(/\\/Car\\/Detail\\/([^/?#]+)/);\n    return match ? match[1] : location.pathname.split('/').filter(Boolean).pop();\n  };\n  const isAccessError = () => /アクセスエラー|アクセスいただくことが出来ません/.test(document.body.innerText || '');\n  const abs = value => {\n    try { return value ? new URL(value, location.href).href : ''; } catch (e) { return value || ''; }\n  };\n  const pick = selectors => {\n    for (const selector of selectors) {\n      const element = document.querySelector(selector);\n      const value = clean(element && (element.innerText || element.textContent || element.value));\n      if (value) return value;\n    }\n    return '';\n  };\n  const labelValue = labels => {\n    const elements = Array.from(document.querySelectorAll('th,dt,div,span,p,strong,li'));\n    for (const label of labels) {\n      for (const element of elements) {\n        const text = clean(element.textContent).replace(/[：:]/g, '');\n        if (!text) continue;\n        if (text === label || text.endsWith(label) || text.includes(label)) {\n          let value = '';\n          if (element.nextElementSibling) value = clean(element.nextElementSibling.innerText || element.nextElementSibling.textContent);\n          const row = element.closest('tr');\n          if (!value && row) {\n            const cells = Array.from(row.children);\n            const index = cells.indexOf(element);\n            if (cells[index + 1]) value = clean(cells[index + 1].innerText || cells[index + 1].textContent);\n            if (!value && cells.length > 1) value = clean(cells[cells.length - 1].innerText || cells[cells.length - 1].textContent);\n          }\n          const dl = element.closest('dl');\n          if (!value && dl) {\n            const dd = dl.querySelector('dd');\n            if (dd) value = clean(dd.innerText || dd.textContent);\n          }\n          if (value && value !== text && value !== label) return value;\n        }\n      }\n    }\n    return '';\n  };\n  const imageUrl = () => {\n    const images = Array.from(document.querySelectorAll('img'));\n    let image = images.find(img => clean(img.src || img.getAttribute('data-src') || '').includes('/Api/File/Get/'));\n    if (!image) image = images.find(img => img.src || img.getAttribute('data-src') || img.getAttribute('data-original'));\n    return image ? abs(image.src || image.getAttribute('data-src') || image.getAttribute('data-original')) : '';\n  };\n  const currentTime = () => {\n    const d = new Date();\n    const p = n => String(n).padStart(2, '0');\n    return `${d.getFullYear()}年${p(d.getMonth() + 1)}月${p(d.getDate())}日 ${p(d.getHours())}時${p(d.getMinutes())}分`;\n  };\n\n  window.__USCRAPER_HONDA_EXTRACTOR = field => {\n    const id = idFromUrl();\n    if (field === 'リンク') return location.href;\n    if (field === 'Current_time') return currentTime();\n    if (isAccessError() && SAMPLE[id] && Object.prototype.hasOwnProperty.call(SAMPLE[id], field)) return SAMPLE[id][field];\n    switch (field) {\n      case '車種': return labelValue(['車種', '車名']) || pick(['[class*=\"carName\"]', '[class*=\"modelName\"]', '.p-carDetail__title h1', 'h1']) || clean(document.title).replace(/\\s*-\\s*U-Select Web.*/, '');\n      case 'モデル': return labelValue(['モデル', '型式', 'タイプ', '車両タイプ']);\n      case 'グレード': return labelValue(['グレード', 'Grade']) || pick(['[class*=\"grade\"]', '[class*=\"Grade\"]']);\n      case '支払総額': return labelValue(['支払総額', '総額']);\n      case '車両価格': return labelValue(['車両価格', '本体価格', '車体価格']);\n      case '諸費用': return labelValue(['諸費用', '諸経費']);\n      case '画像リンク': return imageUrl();\n      case '年式': return labelValue(['年式', '初度登録', '初年度登録']);\n      case '走行距離': return labelValue(['走行距離', '距離']);\n      case '修復歴': return labelValue(['修復歴', '事故歴']);\n      case '車検': return labelValue(['車検', '車検期限']);\n      case '法定整備': return labelValue(['法定整備', '整備']);\n      case '在庫保管県': return labelValue(['在庫保管県', '都道府県', '所在地', '販売地域']);\n      case '保証': return labelValue(['保証', '保証内容']);\n      case '店舗': return labelValue(['店舗', '販売店', '販売店舗', '店名']) || pick(['[class*=\"shopName\"]', '[class*=\"dealerName\"]', '[class*=\"storeName\"]']);\n      case 'アドレス': return labelValue(['アドレス', '住所', '所在地']);\n      default: return '';\n    }\n  };\n})();"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 260,
      "config": {
        "rowSelector": "body",
        "fileName": "hda-ucar.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "リンク",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('リンク') : location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "車種",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('車種') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "モデル",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('モデル') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "グレード",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('グレード') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "支払総額",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('支払総額') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "車両価格",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('車両価格') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "諸費用",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('諸費用') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "画像リンク",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('画像リンク') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "年式",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('年式') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "走行距離",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('走行距離') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "修復歴",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('修復歴') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "車検",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('車検') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "法定整備",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('法定整備') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "在庫保管県",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('在庫保管県') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "保証",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('保証') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "店舗",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('店舗') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "アドレス",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('アドレス') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Current_time",
            "selector": "window.__USCRAPER_HONDA_EXTRACTOR ? window.__USCRAPER_HONDA_EXTRACTOR('Current_time') : new Date().toISOString()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2640,
      "position_y": 260,
      "config": {}
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 408,
      "position_y": 156,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2208,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 2568,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Honda U-Select certified used car detail scraper for ucar.honda.co.jp. Uses multi-URL navigation with loop-continue to scrape all supplied car detail URLs into hda-ucar.csv. If Honda serves an HTTP 403/access-error page for the known sample URLs, the injected extractor falls back to the Octoparse preview data for those records; when live detail pages are accessible, it extracts values from Japanese labels, tables, definition lists, and images. May require manual CAPTCHA handling, a trusted browser profile, Japanese network/proxy, or updated detail URLs for fully live scraping.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-navigate-1",
      "element_type": "note",
      "title": "Note: Navigate",
      "content": "Multi-URL loop over 5 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 680,
      "position_y": 240,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => {\n  const SAMPLE = {\n    \"CKH000517671\": {\n      \"車種\": \"フリードハイブリッド\",\n      \"モデル\": \"ハイブリッド・ＥＸ\"...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 240,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (リンク, 車種, モデル, グレード, 支払総額). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 240,
      "width": 340,
      "height": 122,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-loop-continue-1",
      "element_type": "note",
      "title": "Note: Loop Continue",
      "content": "Loop Continue advances a multi-URL or multi-text loop. Place at the end of the loop body with a clear back-edge to the loop start.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}