{
  "version": "1.0.0",
  "exported_at": "2026-06-03T14:30:00.000Z",
  "project": {
    "name": "Ohouse Shopping Review Scraper",
    "description": "Extracts OHouse Shopping product reviews from multiple product detail URLs. Uses a multi-URL navigation loop for product pages and a click-next pagination loop for review pages, appending all reviews into one CSV. Best-effort template because the provided page analysis only included CDN image URLs, not the live product review DOM; CAPTCHA or login walls may require manual handling.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "urls": [
          "https://store.ohou.se/goods/1475755",
          "https://store.ohou.se/goods/2961039?affect_id=1&affect_type=StoreSearchResult",
          "https://store.ohou.se/goods/744052?affect_id=2&affect_type=StoreSearchResult",
          "https://store.ohou.se/goods/343456?affect_id=3&affect_type=StoreSearchResult",
          "https://store.ohou.se/goods/22282?affect_id=4&affect_type=StoreSearchResult"
        ],
        "color": "bg-[#4589ff]",
        "tags": [
          "input-product-urls",
          "ohouse"
        ]
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 456,
      "position_y": 220,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "jsCode": "(() => { const candidates = Array.from(document.querySelectorAll('a,button,[role=\"button\"]')); const reviewButton = candidates.find(el => /리뷰|후기|Review/i.test((el.innerText || el.textContent || '').trim())); if (reviewButton) reviewButton.click(); const reviewAnchor = Array.from(document.querySelectorAll('*')).find(el => /리뷰|후기|Review/i.test((el.innerText || el.textContent || '').trim()) && el.getBoundingClientRect().top > 0); if (reviewAnchor) reviewAnchor.scrollIntoView({ behavior: 'instant', block: 'center' }); window.scrollBy(0, 600); return true; })();",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1464,
      "position_y": 220,
      "config": {
        "selector": "article.production-review-item, div.production-review-item, li.production-review-item, [data-testid='review-item'], [data-testid*='review'][role='article']",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1800,
      "position_y": 220,
      "config": {
        "rowSelector": "article.production-review-item, div.production-review-item, li.production-review-item, [data-testid='review-item'], [data-testid*='review'][role='article']",
        "fileName": "ohouse-shopping-review-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "상품url",
            "selector": "location.href.split('#')[0]",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "상품명",
            "selector": "(() => { const sels = ['[data-testid=\"product-name\"]', '.production-selling-header__title__name', 'h1[class*=\"title\"]', 'h1']; for (const s of sels) { const el = document.querySelector(s); const t = el && el.textContent ? el.textContent.trim().replace(/\\s+/g, ' ') : ''; if (t) return t; } return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "구매_확정_옵션",
            "selector": "(() => { const sels = ['.production-review-item__name', '[class*=\"review\"] [class*=\"option\"]', '[class*=\"Option\"]', '[class*=\"option\"]']; for (const s of sels) { const el = ROW.querySelector(s); const t = el && el.textContent ? el.textContent.trim().replace(/\\s+/g, ' ') : ''; if (t && !/리뷰|후기/.test(t)) return t; } const txt = ROW.innerText || ''; const m = txt.match(/(?:옵션|컬러|색상|제품선택|구성)[:：][^\\n]+/); return m ? m[0].trim().replace(/\\s+/g, ' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "닉네임",
            "selector": "(() => { const sels = ['.production-review-item__writer__info__name', '[class*=\"writer\"] [class*=\"name\"]', '[class*=\"nickname\"]', '[class*=\"Nickname\"]', '[class*=\"user\"] [class*=\"name\"]']; for (const s of sels) { const el = ROW.querySelector(s); const t = el && el.textContent ? el.textContent.trim().replace(/\\s+/g, ' ') : ''; if (t) return t; } const lines = (ROW.innerText || '').split('\\n').map(x => x.trim()).filter(Boolean); return lines.find(x => !/리뷰|후기|별점|옵션|컬러|색상|제품선택|구성|\\d{4}\\.\\d{1,2}\\.\\d{1,2}/.test(x) && x.length <= 30) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "별점",
            "selector": "(() => { const labels = Array.from(ROW.querySelectorAll('[aria-label],[title]')).map(e => e.getAttribute('aria-label') || e.getAttribute('title') || '').filter(Boolean); const label = labels.find(t => /(별점|star|rating|점)/i.test(t)); if (label) { const m = label.match(/([0-5](?:\\.\\d)?)/); if (m) return m[1]; } const txt = ROW.innerText || ''; const m = txt.match(/([1-5])\\s*(?:점|\\/\\s*5)/); if (m) return m[1]; const activeStars = ROW.querySelectorAll('[class*=\"star\"][class*=\"active\"], [class*=\"star\"][class*=\"filled\"], [class*=\"Star\"][class*=\"Active\"], [class*=\"Star\"][class*=\"Filled\"]').length; return activeStars > 0 && activeStars <= 5 ? String(activeStars) : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "구매일자",
            "selector": "(() => { const txt = ROW.innerText || ''; const m = txt.match(/20\\d{2}[.\\-\\/]\\s?\\d{1,2}[.\\-\\/]\\s?\\d{1,2}/); return m ? m[0].replace(/\\s+/g, '') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "이미지_링크",
            "selector": "Array.from(ROW.querySelectorAll('img')).map(img => img.currentSrc || img.src || img.getAttribute('srcset') || '').filter(Boolean).join(',')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "후기",
            "selector": "(() => { const sels = ['.production-review-item__description', '[class*=\"description\"]', '[class*=\"Description\"]', '[class*=\"content\"]', '[class*=\"Content\"]', 'p']; for (const s of sels) { const el = ROW.querySelector(s); const t = el && el.textContent ? el.textContent.trim().replace(/\\s+/g, ' ') : ''; if (t && t.length > 1 && !/옵션|컬러|색상|제품선택|구성/.test(t)) return t; } const lines = (ROW.innerText || '').split('\\n').map(x => x.trim()).filter(x => x.length > 1); const filtered = lines.filter(x => !/리뷰|후기|별점|옵션|컬러|색상|제품선택|구성|20\\d{2}[.\\-\\/]\\d{1,2}[.\\-\\/]\\d{1,2}/.test(x)); return filtered.sort((a, b) => b.length - a.length)[0] || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "추출날짜",
            "selector": "new Date().toISOString().replace('T', ' ').replace('Z', '')",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2136,
      "position_y": 220,
      "config": {
        "selector": "button[aria-label*='다음']:not([disabled]), a[aria-label*='다음']:not(.disabled), button[aria-label*='Next']:not([disabled]), a[aria-label*='Next']:not(.disabled), .production-review-feed__pagination button:last-child:not([disabled]), [class*='pagination'] button:last-child:not([disabled])"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2472,
      "position_y": 520,
      "config": {
        "selector": "button[aria-label*='다음']:not([disabled]), a[aria-label*='다음']:not(.disabled), button[aria-label*='Next']:not([disabled]), a[aria-label*='Next']:not(.disabled), .production-review-feed__pagination button:last-child:not([disabled]), [class*='pagination'] button:last-child:not([disabled])",
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2808,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 3144,
      "position_y": 520,
      "config": {
        "selector": "article.production-review-item, div.production-review-item, li.production-review-item, [data-testid='review-item'], [data-testid*='review'][role='article']",
        "timeout": 20,
        "visible": true
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2136,
      "position_y": 520,
      "config": {}
    }
  ],
  "connections": [
    {
      "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": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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": "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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-2",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 3344,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "sleep-2",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 720,
      "position_y": 116,
      "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": 1728,
      "position_y": 116,
      "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": 2064,
      "position_y": 116,
      "width": 656,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1",
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Extracts OHouse Shopping product reviews from multiple product detail URLs. Uses a multi-URL navigation loop for product pages and a click-next pagination loop for review pages, appending all reviews into one CSV. Best-effort template because the provided page analysis only included CDN image URLs, not the live product review DOM; CAPTCHA or login walls may require manual handling.",
      "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": 320,
      "position_y": 200,
      "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: `(() => { const candidates = Array.from(document.querySelectorAll('a,button,[role=\"button\"]')); const...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 992,
      "position_y": 200,
      "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 (상품url, 상품명, 구매_확정_옵션, 닉네임, 별점). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `button[aria-label*='다음']:not([disabled]), a[aria-label*='다음']:not(.disabled), button[aria-label*='Next']:not([disabled])`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2336,
      "position_y": 200,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-click-1",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 2672,
      "position_y": 500,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-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": 2336,
      "position_y": 500,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}