{
  "version": "1.0.0",
  "exported_at": "2026-06-01T05:30:00.000Z",
  "project": {
    "name": "Amazonfr Listing Scraper",
    "description": "Scrapes Amazon.fr search/listing results for keyword 'montre', extracting the same fields shown by the Octoparse Amazon.fr Listing Scraper: site, zip/address label, keyword, current page, product name, sponsored flag, product URL, ASIN, rating, review count, reviews URL, current/original price, and image. Pagination is handled with a click-next loop using Amazon's enabled next-page button and appends every page to one CSV. Best effort: Amazon may block automation with CAPTCHA, consent, region, or anti-bot checks; zip code 75001 is recorded as a constant but not actively set in Amazon's delivery-location modal.",
    "color": "bg-[#ff832b]",
    "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.fr/s?k=montre",
        "color": "bg-[#4589ff]",
        "tags": [
          "amazon-fr",
          "search",
          "keyword"
        ]
      }
    },
    {
      "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": 45,
        "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": "input#sp-cc-accept:not([type='hidden'])",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 1128,
      "position_y": 520,
      "config": {
        "selector": "input#sp-cc-accept:not([type='hidden'])",
        "timeout": 8,
        "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": 2,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "selector": "div[data-component-type='s-search-result'][data-asin]",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2136,
      "position_y": 520,
      "config": {
        "rowSelector": "div[data-component-type='s-search-result'][data-asin]",
        "fileName": "amazon-fr-listing-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Site",
            "selector": "'Amazon.fr'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "adresse",
            "selector": "'75001'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Mot_clé",
            "selector": "new URLSearchParams(window.location.search).get('k') || 'montre'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Page_actuel",
            "selector": "new URLSearchParams(window.location.search).get('page') || (document.querySelector('.s-pagination-selected')?.textContent || '1').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Nom_du_produit",
            "selector": "h2 span",
            "attribute": "text"
          },
          {
            "name": "sponsoriser",
            "selector": "((ROW.querySelector('.puis-sponsored-label-text')?.textContent || ROW.querySelector('[aria-label*=\"Sponsored\" i], [aria-label*=\"Sponsorisé\" i]')?.getAttribute('aria-label') || '').trim() ? 'Oui' : '')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Page_produit",
            "selector": "(() => { const a = ROW.querySelector('h2 a[href*=\"/dp/\"], a[href*=\"/dp/\"]'); return a ? new URL(a.getAttribute('href'), location.origin).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ASIN",
            "selector": "(() => { const direct = (ROW.getAttribute('data-asin') || '').trim(); if (direct) return direct; const href = ROW.querySelector('a[href*=\"/dp/\"]')?.href || ''; const parts = href.split('/dp/'); return parts[1] ? parts[1].split('/')[0].split('?')[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Classement",
            "selector": "(ROW.querySelector('i.a-icon-star-small span.a-icon-alt, i.a-icon-star span.a-icon-alt')?.textContent || ROW.querySelector('[aria-label*=\"out of 5 stars\" i], [aria-label*=\"sur 5 étoiles\" i]')?.getAttribute('aria-label') || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Nombre_du_commentaire",
            "selector": "(ROW.querySelector('a[href*=\"customerReviews\"] span')?.textContent || ROW.querySelector('a[aria-label*=\"ratings\" i], a[aria-label*=\"évaluations\" i]')?.getAttribute('aria-label') || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Page_commentaire",
            "selector": "(() => { const a = ROW.querySelector('h2 a[href*=\"/dp/\"], a[href*=\"/dp/\"]'); return a ? new URL(a.getAttribute('href'), location.origin).href.split('#')[0] + '#customerReviews' : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Prix_actuel",
            "selector": "(ROW.querySelector('.a-price:not(.a-text-price) .a-offscreen')?.textContent || ROW.querySelector('.a-price .a-offscreen')?.textContent || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Prix_original",
            "selector": "(ROW.querySelector('.a-price.a-text-price .a-offscreen')?.textContent || ROW.querySelector('.a-text-price .a-offscreen')?.textContent || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Image",
            "selector": "img.s-image",
            "attribute": "src"
          }
        ]
      }
    },
    {
      "block_id": "element-exists-2",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2472,
      "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": 2472,
      "position_y": 520,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    },
    {
      "block_id": "click-2",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2808,
      "position_y": 520,
      "config": {
        "selector": "a.s-pagination-next:not(.s-pagination-disabled)",
        "timeout": 15,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 3144,
      "position_y": 520,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 3480,
      "position_y": 520,
      "config": {
        "selector": "div[data-component-type='s-search-result'][data-asin]",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3816,
      "position_y": 758,
      "config": {
        "duration": 2,
        "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": "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-element-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": "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": "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-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-2",
      "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-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-2",
      "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": "structured-export-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": 4016,
      "height": 834,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "wait-for-page-load-2",
          "wait-for-element-2",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 720,
      "position_y": 116,
      "width": 2336,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1",
          "element-exists-2",
          "click-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2064,
      "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": 2400,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Amazon.fr search/listing results for keyword 'montre', extracting the same fields shown by the Octoparse Amazon.fr Listing Scraper: site, zip/address label, keyword, current page, product name, sponsored flag, product URL, ASIN, rating, review count, reviews URL, current/original price, and image. Pagination is handled with a click-next loop using Amazon's enabled next-page button and appends every page to one CSV. Best effort: Amazon may block automation with CAPTCHA, consent, region, or anti-bot checks; zip code 75001 is recorded as a constant but not actively set in Amazon's delivery-location modal.",
      "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 `input#sp-cc-accept:not([type='hidden'])`. 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": 143,
      "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 (Site, adresse, Mot_clé, Page_actuel, sponsoriser). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2336,
      "position_y": 500,
      "width": 340,
      "height": 130,
      "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": 2672,
      "position_y": 500,
      "width": 340,
      "height": 146,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-2"
      }
    },
    {
      "id": "note-block-click-2",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 3008,
      "position_y": 500,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-2"
      }
    }
  ]
}