{
  "version": "1.0.0",
  "exported_at": "2026-06-03T06:10:00.000Z",
  "project": {
    "name": "Elektra Details Scraper",
    "description": "Extracts Elektra product listing data equivalent to the Octoparse Elektra template: título, precio, precio_original, préstamo, image URL, and product URL. The workflow loops through the Elektra listing/category URLs from the Octoparse input example, dismisses Elektra's postal-code/location popup, scrolls for lazy-loaded cards, repeatedly clicks the VTEX load-more button when available, then appends all loaded products to one CSV. If Elektra presents CAPTCHA or blocking, solve it manually in the browser and resume.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated-elektra-details-scraper"
  },
  "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.elektra.mx/muebles/recamara/cajoneras-y-comodas",
          "https://www.elektra.mx/linea-blanca/climatizacion-y-ventilacion/ventil",
          "https://www.elektra.mx/zapatos/zapatos-de-mujer/botines"
        ],
        "color": "bg-[#4589ff]",
        "tags": [
          "entry",
          "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": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute JavaScript on the page",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "jsCode": "(() => {\n  const clickTexts = ['no, gracias', 'no gracias', 'cerrar', 'aceptar'];\n  for (const el of Array.from(document.querySelectorAll('button, a, span, div'))) {\n    const t = (el.textContent || '').trim().toLowerCase();\n    if (clickTexts.includes(t)) {\n      try { el.click(); } catch (e) {}\n    }\n  }\n  document.querySelectorAll('.popupBackground').forEach(el => el.remove());\n  document.querySelectorAll('.inputPopUpPostalCode').forEach(input => {\n    let p = input;\n    for (let i = 0; i < 8 && p; i++, p = p.parentElement) {\n      const txt = (p.textContent || '').toLowerCase();\n      if (txt.includes('código postal') || txt.includes('codigo postal') || txt.includes('recibir tus compras')) {\n        try { p.remove(); } catch (e) { p.style.display = 'none'; }\n        break;\n      }\n    }\n  });\n  document.querySelectorAll('[class*=\"popup\"], [class*=\"Popup\"], [class*=\"modal\"], [class*=\"Modal\"], [class*=\"postal\"], [class*=\"Postal\"]').forEach(el => {\n    const txt = (el.textContent || '').toLowerCase();\n    if (txt.includes('código postal') || txt.includes('codigo postal') || txt.includes('recibir tus compras') || txt.includes('elige dónde recibir')) {\n      try { el.remove(); } catch (e) { el.style.display = 'none'; }\n    }\n  });\n  document.documentElement.style.overflow = 'auto';\n  document.body.style.overflow = 'auto';\n})();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "selector": "a.vtex-product-summary-2-x-clearLink[href*=\"/p\"]",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "scroll-1",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "direction": "down",
        "amount": 1800,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2640,
      "position_y": 220,
      "config": {
        "selector": ".vtex-search-result-3-x-buttonShowMore button:not(:disabled), .vtex-search-result-3-x-buttonShowMore:not(:disabled), div[class*=\"buttonShowMore\"] button:not(:disabled)",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "inject-javascript-2",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute JavaScript on the page",
      "position_x": 2640,
      "position_y": 540,
      "config": {
        "jsCode": "(() => {\n  const clickTexts = ['no, gracias', 'no gracias', 'cerrar', 'aceptar'];\n  for (const el of Array.from(document.querySelectorAll('button, a, span, div'))) {\n    const t = (el.textContent || '').trim().toLowerCase();\n    if (clickTexts.includes(t)) {\n      try { el.click(); } catch (e) {}\n    }\n  }\n  document.querySelectorAll('.popupBackground').forEach(el => el.remove());\n  document.querySelectorAll('.inputPopUpPostalCode').forEach(input => {\n    let p = input;\n    for (let i = 0; i < 8 && p; i++, p = p.parentElement) {\n      const txt = (p.textContent || '').toLowerCase();\n      if (txt.includes('código postal') || txt.includes('codigo postal') || txt.includes('recibir tus compras')) {\n        try { p.remove(); } catch (e) { p.style.display = 'none'; }\n        break;\n      }\n    }\n  });\n  document.querySelectorAll('[class*=\"popup\"], [class*=\"Popup\"], [class*=\"modal\"], [class*=\"Modal\"], [class*=\"postal\"], [class*=\"Postal\"]').forEach(el => {\n    const txt = (el.textContent || '').toLowerCase();\n    if (txt.includes('código postal') || txt.includes('codigo postal') || txt.includes('recibir tus compras') || txt.includes('elige dónde recibir')) {\n      try { el.remove(); } catch (e) { el.style.display = 'none'; }\n    }\n  });\n  document.documentElement.style.overflow = 'auto';\n  document.body.style.overflow = 'auto';\n})();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 3000,
      "position_y": 540,
      "config": {
        "selector": ".vtex-search-result-3-x-buttonShowMore button:not(:disabled), .vtex-search-result-3-x-buttonShowMore:not(:disabled), div[class*=\"buttonShowMore\"] button:not(:disabled)",
        "timeout": 15,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3360,
      "position_y": 540,
      "config": {
        "duration": 3,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "scroll-2",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page",
      "position_x": 3720,
      "position_y": 540,
      "config": {
        "direction": "down",
        "amount": 1800,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "sleep-4",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 4080,
      "position_y": 540,
      "config": {
        "duration": 2,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2640,
      "position_y": 860,
      "config": {
        "rowSelector": "a.vtex-product-summary-2-x-clearLink[href*=\"/p\"]",
        "fileName": "elektra-detalles-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "titulo",
            "selector": "const h = ROW.querySelector('h3') || ROW.querySelector('[class*=\"productBrand\"]') || ROW.querySelector('[class*=\"productName\"]'); const raw = (h ? h.textContent : ROW.textContent || '').replace(/\\s+/g, ' ').trim(); return raw.replace(/Desde\\s*\\$[\\s\\S]*$/i, '').replace(/\\$[\\s\\S]*$/i, '').trim();",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio",
            "selector": "const text = (ROW.innerText || ROW.textContent || '').replace(/\\s+/g, ' ').trim(); const amounts = Array.from(text.matchAll(/\\$\\s?[\\d,.]+/g)).map(m => m[0].replace(/\\s+/g, '')); const weeklyMatch = text.match(/(?:Desde\\s*)?(\\$\\s?[\\d,.]+)\\s*(?:a\\s*\\d+\\s*semanas|semanales)/i); const weekly = weeklyMatch ? weeklyMatch[1].replace(/\\s+/g, '') : null; let skipped = false; const filtered = amounts.filter(a => { if (weekly && a === weekly && !skipped) { skipped = true; return false; } return true; }); return filtered.length ? filtered[filtered.length - 1] : '';",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio_original",
            "selector": "const text = (ROW.innerText || ROW.textContent || '').replace(/\\s+/g, ' ').trim(); const amounts = Array.from(text.matchAll(/\\$\\s?[\\d,.]+/g)).map(m => m[0].replace(/\\s+/g, '')); const weeklyMatch = text.match(/(?:Desde\\s*)?(\\$\\s?[\\d,.]+)\\s*(?:a\\s*\\d+\\s*semanas|semanales)/i); const weekly = weeklyMatch ? weeklyMatch[1].replace(/\\s+/g, '') : null; let skipped = false; const filtered = amounts.filter(a => { if (weekly && a === weekly && !skipped) { skipped = true; return false; } return true; }); return filtered.length > 1 ? filtered[filtered.length - 2] : '';",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prestamo",
            "selector": "const text = (ROW.innerText || ROW.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/(?:Desde\\s*)?\\$\\s?[\\d,.]+\\s*(?:a\\s*\\d+\\s*semanas|semanales(?:\\s+con)?)/i); return m ? m[0].trim() : '';",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "imagen_url",
            "selector": "const img = ROW.querySelector('img'); if (!img) return ''; const srcset = img.getAttribute('srcset') || ''; return img.currentSrc || img.src || img.getAttribute('data-src') || img.getAttribute('data-lazy') || srcset.split(/\\s+/)[0] || '';",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "producto_url",
            "selector": "",
            "attribute": "href"
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 3000,
      "position_y": 860,
      "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": "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": "scroll-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "inject-javascript-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-2",
      "from_connector_id": "right",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-3",
      "from_connector_id": "right",
      "to_block_id": "scroll-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-2",
      "from_connector_id": "right",
      "to_block_id": "sleep-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-4",
      "from_connector_id": "right",
      "to_block_id": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "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": 4280,
      "height": 616,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "sleep-2",
          "sleep-3",
          "sleep-4"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1128,
      "position_y": 116,
      "width": 2840,
      "height": 616,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1",
          "scroll-1",
          "inject-javascript-2",
          "scroll-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 2568,
      "position_y": 116,
      "width": 680,
      "height": 936,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1",
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2568,
      "position_y": 756,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Extracts Elektra product listing data equivalent to the Octoparse Elektra template: título, precio, precio_original, préstamo, image URL, and product URL. The workflow loops through the Elektra listing/category URLs from the Octoparse input example, dismisses Elektra's postal-code/location popup, scrolls for lazy-loaded cards, repeatedly clicks the VTEX load-more button when available, then appends all loaded products to one CSV. If Elektra presents CAPTCHA or blocking, solve it manually in the browser and resume.",
      "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: `(() => {\n  const clickTexts = ['no, gracias', 'no gracias', 'cerrar', 'aceptar'];\n  for (const el of...` 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-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `.vtex-search-result-3-x-buttonShowMore button:not(:disabled), .vtex-search-result-3-x-buttonShowMore:not(:disabled), div`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 200,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-inject-javascript-2",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => {\n  const clickTexts = ['no, gracias', 'no gracias', 'cerrar', 'aceptar'];\n  for (const el of...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 520,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-2"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (titulo, precio, precio_original, prestamo, imagen_url). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 840,
      "width": 340,
      "height": 131,
      "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": 3200,
      "position_y": 840,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}