{
  "version": "1.0.0",
  "exported_at": "2026-06-02T14:00:00.000Z",
  "project": {
    "name": "Idealo Details Scraper",
    "description": "Scrapes Idealo product detail pages by a configurable list of detail URLs. Extracts product URL, image URL, product title, variant/detail suffix, best-effort price history/current price data, product type, and other datasheet properties. Navigation uses navigate.urls[] plus loop-continue to process all supplied detail page URLs; Idealo carousel next buttons are ignored because they are image navigation, not result pagination. Historical price data may be unavailable if Idealo loads it through protected/dynamic APIs.",
    "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://www.idealo.de/preisvergleich/OffersOfProduct/5607478_-hefe-weissbier-naturtrueb-paulaner.html",
          "https://www.idealo.de/preisvergleich/OffersOfProduct/5605766_-premium-pilsener-0-33l-dose-warsteiner.html"
        ],
        "color": "bg-[#4589ff]",
        "tags": [
          "idealo",
          "detail-pages",
          "multi-url"
        ]
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 480,
      "position_y": 220,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "selector": "#oopStage-title, h1",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript on the page",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "jsCode": "(() => { const target = document.querySelector('#datasheet, [href=\"#datasheet\"], .datasheet-listItem, #offerList'); if (target && target.scrollIntoView) target.scrollIntoView({ block: 'center' }); window.dispatchEvent(new Event('scroll')); return true; })();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "duration": 2,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "rowSelector": "body",
        "fileName": "idealo-details-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Produkt_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Image_url",
            "selector": "(() => { const scripts = Array.from(document.querySelectorAll('script[type=\"application/ld+json\"]')).map(s => { try { return JSON.parse(s.textContent); } catch (e) { return null; } }).filter(Boolean); const product = scripts.find(o => o && o['@type'] === 'Product') || scripts.find(o => o && o.image); let img = product && product.image; if (Array.isArray(img)) img = img[0]; if (!img) { const meta = document.querySelector('meta[property=\"og:image\"], meta[name=\"og:image\"]'); img = meta && meta.content; } if (!img) { const el = document.querySelector('.simple-carousel-slides img, .splide__slide img, .oopStage-gallery img'); img = el && el.getAttribute('src'); } return img ? new URL(img, location.href).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Produkt_Titel",
            "selector": "(() => { const el = document.querySelector('#oopStage-title') || document.querySelector('h1'); return el ? el.innerText.trim().replace(/\\s+/g, ' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Produkt_Details",
            "selector": "(() => { const titleEl = document.querySelector('#oopStage-title') || document.querySelector('h1'); const title = titleEl ? titleEl.innerText.trim().replace(/\\s+/g, ' ') : ''; let base = ''; for (const s of document.querySelectorAll('script[type=\"application/ld+json\"]')) { try { const o = JSON.parse(s.textContent); if (o && o['@type'] === 'Product' && o.name) { base = String(o.name).trim().replace(/\\s+/g, ' '); break; } } catch (e) {} } if (base && title.startsWith(base) && title.length > base.length) return title.slice(base.length).trim(); const crumbs = Array.from(document.querySelectorAll('.breadcrumb-linkText')).map(e => e.innerText.trim().replace(/\\s+/g, ' ')).filter(Boolean); const last = crumbs[crumbs.length - 1] || ''; if (last && title.startsWith(last) && title.length > last.length) return title.slice(last.length).trim(); return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Preisentwicklung",
            "selector": "(() => { const scriptText = Array.from(document.querySelectorAll('script')).map(s => s.textContent || '').join('\\n'); const pairs = []; const patterns = [/(?:(?:\"date\"|\"time\"|timestamp|x)\\s*[:=]\\s*\"?(\\d{4}-\\d{2}-\\d{2})\"?[\\s\\S]{0,100}?(?:\"price\"|y|value)\\s*[:=]\\s*\"?(\\d+(?:[\\.,]\\d+)?))/gi, /(?:(?:\"price\"|y|value)\\s*[:=]\\s*\"?(\\d+(?:[\\.,]\\d+)?)\"?[\\s\\S]{0,100}?(?:\"date\"|\"time\"|timestamp|x)\\s*[:=]\\s*\"?(\\d{4}-\\d{2}-\\d{2}))/gi]; for (const re of patterns) { let m; while ((m = re.exec(scriptText)) && pairs.length < 500) { const firstIsDate = /^\\d{4}-\\d{2}-\\d{2}$/.test(m[1]); const date = firstIsDate ? m[1] : m[2]; const price = firstIsDate ? m[2] : m[1]; if (date && price) pairs.push(`time：${date} price：${String(price).replace(',', '.')}`); } if (pairs.length) break; } if (pairs.length) return Array.from(new Set(pairs)).join('，'); let product = null; for (const s of document.querySelectorAll('script[type=\"application/ld+json\"]')) { try { const o = JSON.parse(s.textContent); if (o && o['@type'] === 'Product') { product = o; break; } } catch (e) {} } const offers = product && product.offers ? product.offers : {}; const parts = []; if (offers.lowPrice !== undefined) parts.push(`current_low_price：${offers.lowPrice}`); if (offers.highPrice !== undefined) parts.push(`current_high_price：${offers.highPrice}`); if (offers.priceCurrency) parts.push(`currency：${offers.priceCurrency}`); return parts.join('，'); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Produkttyp",
            "selector": "(() => { const rows = Array.from(document.querySelectorAll('.datasheet-listItem')); const row = rows.find(r => /Produkttyp/i.test((r.querySelector('.datasheet-listItemKey') || {}).innerText || '')); const val = row && row.querySelector('.datasheet-listItemValue'); return val ? val.innerText.trim().replace(/\\s+/g, ' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Weitere_Eigenschaften",
            "selector": "(() => { const rows = Array.from(document.querySelectorAll('.datasheet-listItem')); return rows.map(r => { const keyEl = r.querySelector('.datasheet-listItemKey'); const valEl = r.querySelector('.datasheet-listItemValue'); const key = keyEl ? keyEl.innerText.trim().replace(/\\s+/g, ' ') : ''; const val = valEl ? valEl.innerText.trim().replace(/\\s+/g, ' ') : ''; if (!key || !val || /Produkttyp/i.test(key)) return ''; return `${key}: ${val}`; }).filter(Boolean).join('; '); })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2280,
      "position_y": 520,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-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": "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-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1128,
      "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": 1848,
      "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": 2208,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Idealo product detail pages by a configurable list of detail URLs. Extracts product URL, image URL, product title, variant/detail suffix, best-effort price history/current price data, product type, and other datasheet properties. Navigation uses navigate.urls[] plus loop-continue to process all supplied detail page URLs; Idealo carousel next buttons are ignored because they are image navigation, not result pagination. Historical price data may be unavailable if Idealo loads it through protected/dynamic APIs.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => { const target = document.querySelector('#datasheet, [href=\"#datasheet\"], .datasheet-listItem...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1400,
      "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 (Produkt_url, Image_url, Produkt_Titel, Produkt_Details, Preisentwicklung). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 200,
      "width": 340,
      "height": 138,
      "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": 2480,
      "position_y": 500,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}