{
  "version": "1.0.0",
  "exported_at": "2026-06-01T20:05:00.000Z",
  "project": {
    "name": "Amazon Product Listing Scraper for MÃxico",
    "description": "Best-effort Amazon.com.mx product listing scraper equivalent to the Octoparse template. It opens Amazon México, handles the observed continue-shopping anti-bot gate when present, searches for the default keyword \"almohada\", and extracts Keyword, ASIN, Title, Detail_Page_URL, Star_Rating, Number_of_Reviews, Price, and Current_Time from product listing rows. Pagination uses a click-next loop with selector a.s-pagination-next:not(.s-pagination-disabled) and appends all pages to amazon_mexico_listados_scraper.csv until no enabled Next button remains. Amazon may show CAPTCHA/anti-bot pages; if a full CAPTCHA appears, manual intervention in the browser may be required. Postal code setting is not automated because Amazon location dialogs vary by session/account.",
    "color": "bg-[#ff9900]",
    "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": {
        "url": "https://www.amazon.com.mx/",
        "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": 456,
      "position_y": 220,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "selector": "form[action*='validateCaptcha'] button[type='submit'], form[action*='/errors/validateCaptcha'] button.a-button-text, button[alt='Continuar a Compras']",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 1128,
      "position_y": 520,
      "config": {
        "selector": "form[action*='validateCaptcha'] button[type='submit'], form[action*='/errors/validateCaptcha'] button.a-button-text, button[alt='Continuar a Compras']",
        "timeout": 15,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 1800,
      "position_y": 520,
      "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": 2136,
      "position_y": 520,
      "config": {
        "selector": "#twotabsearchtextbox",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "type-text-1",
      "block_type": "process",
      "title": "Type Text",
      "description": "Type text into input",
      "position_x": 2472,
      "position_y": 520,
      "config": {
        "selector": "#twotabsearchtextbox",
        "text": "almohada",
        "clearFirst": true,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "click-2",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2808,
      "position_y": 520,
      "config": {
        "selector": "#nav-search-submit-button, input[type='submit'][value='Ir']",
        "timeout": 15,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-page-load-3",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 3144,
      "position_y": 520,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3480,
      "position_y": 520,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 3816,
      "position_y": 520,
      "config": {
        "selector": "div[data-component-type='s-search-result'][data-asin]:not([data-asin=''])",
        "timeout": 60,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 4152,
      "position_y": 520,
      "config": {
        "rowSelector": "div[data-component-type='s-search-result'][data-asin]:not([data-asin=''])",
        "fileName": "amazon_mexico_listados_scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "keyword",
            "selector": "'almohada'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "asin",
            "selector": "",
            "attribute": "data-asin"
          },
          {
            "name": "title",
            "selector": "(() => { const el = ROW.querySelector('h2 span') || ROW.querySelector('h2') || ROW.querySelector('[data-cy=\"title-recipe\"]'); return el ? el.textContent.trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "detail_page_url",
            "selector": "(() => { const a = ROW.querySelector('h2 a') || ROW.querySelector('a.a-link-normal.s-no-outline') || ROW.querySelector('a[href*=\"/dp/\"]'); return a ? new URL(a.getAttribute('href'), location.origin).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "star_rating",
            "selector": "i.a-icon-star-small span.a-icon-alt, i.a-icon-star span.a-icon-alt, span.a-icon-alt",
            "attribute": "text"
          },
          {
            "name": "number_of_reviews",
            "selector": "(() => { const candidates = Array.from(ROW.querySelectorAll('a[href*=\"customerReviews\"] span, a[href*=\"#customerReviews\"] span, span.s-underline-text')); const el = candidates.find(e => /[0-9]/.test(e.textContent || '')); return el ? el.textContent.trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "price",
            "selector": "(() => { const off = ROW.querySelector('.a-price > .a-offscreen'); if (off && off.textContent.trim()) return off.textContent.trim(); const whole = ROW.querySelector('.a-price-whole'); const fraction = ROW.querySelector('.a-price-fraction'); if (whole) return '$' + whole.textContent.trim().replace(/\\.$/, '') + (fraction ? '.' + fraction.textContent.trim() : ''); return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "current_time",
            "selector": "new Date().toLocaleString('es-MX')",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "element-exists-2",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 4488,
      "position_y": 520,
      "config": {
        "selector": "a.s-pagination-next:not(.s-pagination-disabled)",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 4488,
      "position_y": 520,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    },
    {
      "block_id": "click-3",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 4824,
      "position_y": 520,
      "config": {
        "selector": "a.s-pagination-next:not(.s-pagination-disabled)",
        "timeout": 15,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-page-load-4",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 5160,
      "position_y": 520,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 5496,
      "position_y": 758,
      "config": {
        "duration": 4,
        "color": "bg-[#08bdba]"
      }
    }
  ],
  "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": "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": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-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-page-load-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-2",
      "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": "type-text-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "type-text-1",
      "from_connector_id": "right",
      "to_block_id": "click-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-2",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-3",
      "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": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "element-exists-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "false",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "true",
      "to_block_id": "click-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-3",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-4",
      "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": "wait-for-element-2",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 5696,
      "height": 834,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-page-load-2",
          "wait-for-element-1",
          "wait-for-page-load-3",
          "sleep-2",
          "wait-for-element-2",
          "wait-for-page-load-4",
          "sleep-3"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 720,
      "position_y": 116,
      "width": 4352,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1",
          "click-2",
          "element-exists-2",
          "click-3"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 2400,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "type-text-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 4080,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 4416,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Amazon.com.mx product listing scraper equivalent to the Octoparse template. It opens Amazon México, handles the observed continue-shopping anti-bot gate when present, searches for the default keyword \"almohada\", and extracts Keyword, ASIN, Title, Detail_Page_URL, Star_Rating, Number_of_Reviews, Price, and Current_Time from product listing rows. Pagination uses a click-next loop with selector a.s-pagination-next:not(.s-pagination-disabled) and appends all pages to amazon_mexico_listados_scraper.csv until no enabled Next button remains. Amazon may show CAPTCHA/anti-bot pages; if a full CAPTCHA appears, manual intervention in the browser may be required. Postal code setting is not automated because Amazon location dialogs vary by session/account.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `form[action*='validateCaptcha'] button[type='submit'], form[action*='/errors/validateCaptcha'] button.a-button-text, but`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 992,
      "position_y": 200,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (keyword, title, detail_page_url, number_of_reviews, price). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 4352,
      "position_y": 500,
      "width": 340,
      "height": 133,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-element-exists-2",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `a.s-pagination-next:not(.s-pagination-disabled)`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 4688,
      "position_y": 500,
      "width": 340,
      "height": 146,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-2"
      }
    },
    {
      "id": "note-block-click-3",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 5024,
      "position_y": 500,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-3"
      }
    }
  ]
}