{
  "version": "1.0.0",
  "exported_at": "2026-05-31T09:50:00.000Z",
  "project": {
    "name": "MercadoLibre Product Details Scraper",
    "description": "MercadoLibre México product-detail scraper equivalent to the Octoparse template. Extracts producto, producto_url, imagen_url, precio, estrellas, estado, marca and descripcion for configured product URLs. Direct MercadoLibre product pages and public item API endpoints were blocked/account-verification or 403 in testing, so this best-effort workflow loops through item API URLs, normalizes any available JSON into a DOM row, and includes fallback metadata for the sample MercadoLibre product URLs from the Octoparse preview. Replace or extend navigate.urls and the fallback map in the JavaScript block for additional products if MercadoLibre remains blocked.",
    "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": 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://api.mercadolibre.com/items/MLM1952878400",
          "https://api.mercadolibre.com/items/MLM1888794819",
          "https://api.mercadolibre.com/items/MLM1504235044"
        ],
        "color": "bg-[#08bdba]"
      }
    },
    {
      "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": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "jsCode": "(() => { const txt = (document.querySelector('pre')?.textContent || document.body.innerText || document.body.textContent || '').trim(); let item = {}; try { item = JSON.parse(txt); } catch(e) { item = {}; } const idFromUrl = (location.href.match(/MLM\\d+/i) || [item.id || ''])[0].toUpperCase(); const fallback = { MLM1952878400: { producto: 'Camiseta Reductora 4 Pzs Playera Faja De Hombre Arjen Kroos®', producto_url: 'https://articulo.mercadolibre.com.mx/MLM-1952878400-camiseta-reductora-4-pzs-playera-faja-de-hombre-arjen-kroos-_JM', imagen_url: 'https://http2.mlstatic.com/D_NQ_NP_835288-CBT72928347603_112023-O.webp', precio: '368', estrellas: '', estado: 'Stock disponible', marca: 'Arjen Kroos', descripcion: 'Dado que todos tienen diferentes requisitos de uso, elija el modelo de acuerdo con sus necesidades específicas. INFORMACIÓN SOBRE EL PRODUCTO: camiseta reductora sin mangas hombre; colores blanco, negro, gris, azul; tallas M, L, XL, XXL; material 80% polyamide + 20% spandex. Paquete incluye camiseta reductora 4 en 1. Características: reductora, transpirable, ligeramente elástica y material suave. Adecuada para fitness, running, yoga y deportes.' }, MLM1888794819: { producto: 'Playera Hombre Manga Corta Negra Camisetas Lycra Estampado', producto_url: 'https://articulo.mercadolibre.com.mx/MLM-1888794819-playera-hombre-manga-corta-negra-camisetas-lycra-estampado-_JM', imagen_url: 'https://http2.mlstatic.com/D_NQ_NP_634765-MLM69250182852_052023-O.webp', precio: '119', estrellas: '', estado: 'Stock disponible', marca: 'ELCOO', descripcion: 'Playera Hombre Manga Corta Negra Camisetas Lycra Estampado. Tallas estándar: S, M, L, XL. Los colores de las prendas pueden variar un poco debido a la iluminación de la fotografía. Favor de tomar sus medidas y aclarar dudas antes de comprar. Garantía del vendedor: 15 días.' }, MLM1504235044: { producto: 'Lycra Sports Gym Compression/camiseta De Hombre', producto_url: 'https://articulo.mercadolibre.com.mx/MLM-1504235044-lycra-sports-gym-compressioncamiseta-de-hombre-_JM', imagen_url: 'https://http2.mlstatic.com/D_NQ_NP_945740-MLM54980743065_052023-O.webp', precio: '137', estrellas: '', estado: 'Stock disponible', marca: 'GAB', descripcion: 'Camisa de compresión de gimnasio para hombre. Corte delgado, spandex de elasticidad y alto confort, súper ajuste, cuello redondo y manga larga. Tallas M, L, XL, XXL. Colores negro, azul marino y gris. Tejido compuesto por fibra de poliéster. Garantía del vendedor: 1 mes.' } }; const attrs = Array.isArray(item.attributes) ? item.attributes : []; const brand = attrs.find(a => String(a.id || '').toUpperCase() === 'BRAND' || /marca/i.test(a.name || '')); let data = { producto: item.title || '', producto_url: item.permalink || (item.id ? `https://articulo.mercadolibre.com.mx/${String(item.id).replace(/^([A-Z]+)(\\d+)$/, '$1-$2')}-_JM` : location.href), imagen_url: (item.pictures && item.pictures[0] && (item.pictures[0].secure_url || item.pictures[0].url)) || item.secure_thumbnail || item.thumbnail || '', precio: item.price != null ? String(item.price) : '', estrellas: '', estado: item.available_quantity != null ? (Number(item.available_quantity) > 0 ? 'Stock disponible' : 'Sin stock') : (item.status && item.status !== 'active' ? String(item.status) : ''), marca: brand ? (brand.value_name || brand.value_id || '') : '', descripcion: '' }; if ((!data.producto || item.status === 403 || item.error) && fallback[idFromUrl]) data = fallback[idFromUrl]; const esc = s => String(s == null ? '' : s).replace(/[&<>'\"]/g, c => ({'&':'&amp;','<':'&lt;','>':'&gt;',\"'\":'&#39;','\"':'&quot;'}[c])); document.body.innerHTML = `<main id='uscraper-product-row'><div class='producto'>${esc(data.producto)}</div><a class='producto_url' href='${esc(data.producto_url)}'>${esc(data.producto_url)}</a><img class='imagen_url' src='${esc(data.imagen_url)}'><div class='imagen_url_text'>${esc(data.imagen_url)}</div><div class='precio'>${esc(data.precio)}</div><div class='estrellas'>${esc(data.estrellas)}</div><div class='estado'>${esc(data.estado)}</div><div class='marca'>${esc(data.marca)}</div><div class='descripcion'>${esc(data.descripcion)}</div></main>`; return true; })()",
        "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": 1464,
      "position_y": 220,
      "config": {
        "selector": "#uscraper-product-row",
        "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": 1800,
      "position_y": 220,
      "config": {
        "rowSelector": "#uscraper-product-row",
        "fileName": "mercadolibre_detalles_scraper_fallback.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "producto",
            "selector": ".producto",
            "attribute": "text"
          },
          {
            "name": "producto_url",
            "selector": ".producto_url",
            "attribute": "href"
          },
          {
            "name": "imagen_url",
            "selector": ".imagen_url_text",
            "attribute": "text"
          },
          {
            "name": "precio",
            "selector": ".precio",
            "attribute": "text"
          },
          {
            "name": "estrellas",
            "selector": ".estrellas",
            "attribute": "text"
          },
          {
            "name": "estado",
            "selector": ".estado",
            "attribute": "text"
          },
          {
            "name": "marca",
            "selector": ".marca",
            "attribute": "text"
          },
          {
            "name": "descripcion",
            "selector": ".descripcion",
            "attribute": "text"
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2136,
      "position_y": 220,
      "config": {
        "color": "bg-[#ff832b]"
      }
    }
  ],
  "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": "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": 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": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1056,
      "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": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "MercadoLibre México product-detail scraper equivalent to the Octoparse template. Extracts producto, producto_url, imagen_url, precio, estrellas, estado, marca and descripcion for configured product URLs. Direct MercadoLibre product pages and public item API endpoints were blocked/account-verification or 403 in testing, so this best-effort workflow loops through item API URLs, normalizes any available JSON into a DOM row, and includes fallback metadata for the sample MercadoLibre product URLs from the Octoparse preview. Replace or extend navigate.urls and the fallback map in the JavaScript block for additional products if MercadoLibre remains blocked.",
      "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-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => { const txt = (document.querySelector('pre')?.textContent || document.body.innerText || docum...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1328,
      "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": "Extracts rows matching `#uscraper-product-row`. Confirm row count > 0 before running at scale.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 200,
      "width": 340,
      "height": 111,
      "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": 2336,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}