{
  "version": "1.0.0",
  "exported_at": "2026-06-02T21:30:00.000Z",
  "project": {
    "name": "Metros CÃºbicos Details Scraper",
    "description": "Best-effort Metros Cúbicos / Mercado Libre México property detail scraper equivalent to the Octoparse details-by-URL template. Processes multiple supplied detail-page URLs with navigate.urls[] and loop-continue, appending one row per URL to metros-cubicos-detalles-scraper.csv. For accessible pages, it extracts Estado, Página_URL, Nombre, Fecha_de_la_publicación / seller line, Precio, Ubicación, Superficie_total, Recámaras, Baños, Superficie_construida, Ambientes, Estacionamientos, Antigüedad, Descripción, and Imagen_URLs. If Mercado Libre account verification is detected, the template writes a diagnostic row instead of blank property data. The target site may require login, cookies, a trusted browser profile, or may block automated access.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser viewport size",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 456,
      "position_y": 220,
      "config": {
        "urls": [
          "https://casa.metroscubicos.com/MLM-1470458930-residencia-u-hotel-boutique-en-tepoztlan-_JM#position=1&search_layout=grid&type=item&tracking_id=a4edbb1f-2bdb-48c7-ba7b-05e88aab5e60",
          "https://casa.metroscubicos.com/MLM-1471138473-casa-en-moctezuma-venustiano-carranza-con-4-recamaras-185-m-id-86977-_JM#position=4&search_layout=grid&type=item&tracking_id=2657b73d-ecae-4686-b070-76e5275b471a",
          "https://casa.metroscubicos.com/MLM-1470608384-casa-en-santa-cruz-del-valle-tlajomulco-de-zuniga-con-3-recamaras-85-m-id-86760-_JM#position=5&search_layout=grid&type=item&tracking_id=2657b73d-ecae-4686-b070-76e5275b471a"
        ],
        "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": 792,
      "position_y": 220,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "duration": 2,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1464,
      "position_y": 220,
      "config": {
        "selector": ".account-verification-main, .new-user-button, .old-user-button",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "structured-export-2",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "rowSelector": "body",
        "fileName": "metros-cubicos-detalles-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#ff832b]",
        "columns": [
          {
            "name": "estado",
            "selector": "'BLOQUEADO - requiere login/verificación Mercado Libre'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "pagina_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "nombre",
            "selector": "'Mercado Libre account verification'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "fecha_de_la_publicacion",
            "selector": "document.querySelector('.message-code')?.textContent.replace(/\\s+/g, ' ').trim() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ubicacion",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "superficie_total",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "recamaras",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "banos",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "superficie_construida",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ambientes",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "estacionamientos",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "antiguedad",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "descripcion",
            "selector": "(() => { const txt = document.body?.innerText || ''; return txt.replace(/\\s+/g, ' ').trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "imagen_urls",
            "selector": "Array.from(document.querySelectorAll('img')).map(img => img.currentSrc || img.src || '').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": 2136,
      "position_y": 520,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "selector": "h1, .ui-pdp-title, .ui-pdp-price, .andes-money-amount, .ui-pdp-description__content",
        "timeout": 20,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1968,
      "position_y": 800,
      "config": {
        "rowSelector": "body",
        "fileName": "metros-cubicos-detalles-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "estado",
            "selector": "(() => { const t = ROW.innerText || document.title || ''; const m = t.match(/(?:Casa|Departamento|Terreno|Local|Oficina|Bodega)\\s+en\\s+(?:Renta|Venta)/i); return m ? m[0].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "pagina_url",
            "selector": "document.querySelector('link[rel=canonical]')?.href || location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "nombre",
            "selector": "(() => { const el = document.querySelector('h1.ui-pdp-title, h1[class*=title], h1'); return el ? el.textContent.replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "fecha_de_la_publicacion",
            "selector": "(() => { const el = document.querySelector('.ui-pdp-subtitle, [class*=subtitle]'); return el ? el.textContent.replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio",
            "selector": "(() => { const el = document.querySelector('.ui-pdp-price .andes-money-amount, [class*=price] .andes-money-amount, .andes-money-amount'); return el ? el.textContent.replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ubicacion",
            "selector": "(() => { const qs = ['.ui-pdp-media__title', '.ui-pdp-location__subtitle', '[class*=location]']; for (const q of qs) { const el = document.querySelector(q); if (el && el.textContent.trim()) return el.textContent.replace(/\\s+/g, ' ').trim(); } return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "superficie_total",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Superficie total|Área total|Area total/i) || (lines.find(l => /m²\\s*totales/i.test(l)) || ''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "recamaras",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Rec[aá]maras/i) || (lines.find(l => /\\d+\\s*rec[aá]?m?/i.test(l)) || ''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "banos",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Baños|Banos/i) || (lines.find(l => /\\d+\\s*baños?/i.test(l)) || ''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "superficie_construida",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Superficie construida|Construidos|Construcci[oó]n/i) || (lines.find(l => /^\\d[\\d,.]*\\s*m²$/i.test(l)) || ''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ambientes",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Ambientes/i); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "estacionamientos",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Estacionamientos|Cocheras|Garages/i) || (lines.find(l => /\\d+\\s*estacion/i.test(l)) || ''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "antiguedad",
            "selector": "(() => { const lines = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const after = re => { for (let i = 0; i < lines.length; i++) if (re.test(lines[i])) return (lines[i + 1] || '').trim(); return ''; }; return after(/Antigüedad|Antiguedad|Años de antig/i) || (lines.find(l => /\\d+\\s*años?/i.test(l)) || ''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "descripcion",
            "selector": "(() => { const el = document.querySelector('.ui-pdp-description__content, [data-testid=description], section[class*=description] p, [class*=description]'); return el ? el.textContent.replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "imagen_urls",
            "selector": "(() => Array.from(document.querySelectorAll('.ui-pdp-gallery img, img.ui-pdp-image, img')).map(img => img.currentSrc || img.src || img.getAttribute('data-src') || '').filter(u => u && /^https?:/i.test(u) && !/logo/i.test(u)).filter((u, i, a) => a.indexOf(u) === i).join(' | '))()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-2",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2304,
      "position_y": 800,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "structured-export-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-2",
      "from_connector_id": "right",
      "to_block_id": "loop-continue-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-2",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 116,
      "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": 384,
      "position_y": 116,
      "width": 1328,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1392,
      "position_y": 116,
      "width": 1160,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "loop-continue-1",
          "loop-continue-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1728,
      "position_y": 416,
      "width": 488,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-2",
          "structured-export-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Metros Cúbicos / Mercado Libre México property detail scraper equivalent to the Octoparse details-by-URL template. Processes multiple supplied detail-page URLs with navigate.urls[] and loop-continue, appending one row per URL to metros-cubicos-detalles-scraper.csv. For accessible pages, it extracts Estado, Página_URL, Nombre, Fecha_de_la_publicación / seller line, Precio, Ubicación, Superficie_total, Recámaras, Baños, Superficie_construida, Ambientes, Estacionamientos, Antigüedad, Descripción, and Imagen_URLs. If Mercado Libre account verification is detected, the template writes a diagnostic row instead of blank property data. The target site may require login, cookies, a trusted browser profile, or may block automated access.",
      "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 3 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 656,
      "position_y": 200,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `.account-verification-main, .new-user-button, .old-user-button`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1664,
      "position_y": 200,
      "width": 340,
      "height": 151,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-structured-export-2",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (estado, pagina_url, nombre, fecha_de_la_publicacion, precio). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 500,
      "width": 340,
      "height": 133,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-2"
      }
    },
    {
      "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"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (estado, pagina_url, nombre, fecha_de_la_publicacion, precio). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2168,
      "position_y": 780,
      "width": 340,
      "height": 133,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-loop-continue-2",
      "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": 2504,
      "position_y": 780,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-2"
      }
    }
  ]
}