{
  "version": "1.0.0",
  "exported_at": "2026-06-02T15:15:00.000Z",
  "project": {
    "name": "La Centrale Data Scraper",
    "description": "Best-effort scraper for La Centrale listing pages. Extracts vehicle title, subtitle, year, mileage, transmission, fuel, prices, deal label, warranty, delivery flag, photo URL, and detail-page URL when listing pages are accessible. La Centrale returned DataDome CAPTCHA/403 during analysis and autonomous testing; if CAPTCHA is detected, this template saves a screenshot and ends gracefully because UScraper cannot bypass CAPTCHA. If access is allowed, it scrapes all reachable listing pages using a next-button pagination loop and appends to lacentrale-data-scraper.csv.",
    "color": "bg-[#4589ff]",
    "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.lacentrale.fr/listing?options=#E114172293",
        "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
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "selector": "iframe[src*='captcha-delivery.com'], iframe[title*='DataDome'], script[src*='captcha-delivery.com'], [src*='captcha-delivery.com'], [title*='DataDome']"
      }
    },
    {
      "block_id": "take-screenshot-1",
      "block_type": "output",
      "title": "Take Screenshot",
      "description": "Capture page screenshot",
      "position_x": 1128,
      "position_y": 520,
      "config": {
        "filename": "lacentrale-blocked-datadome",
        "fullPage": true,
        "saveFolder": "downloads"
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 1464,
      "position_y": 520,
      "config": {}
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 792,
      "position_y": 520,
      "config": {
        "jsCode": "(() => { const labels = ['accepter', 'accept', 'tout accepter', 'j’accepte', \"j'accepte\"]; const buttons = Array.from(document.querySelectorAll('button, [role=\"button\"], input[type=\"button\"], input[type=\"submit\"]')); const btn = buttons.find(b => labels.some(label => (b.innerText || b.value || b.getAttribute('aria-label') || '').toLowerCase().includes(label))); if (btn) btn.click(); return true; })();",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1296,
      "position_y": 800,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1632,
      "position_y": 800,
      "config": {
        "selector": "a[href*='auto-occasion-annonce-']",
        "timeout": 45,
        "visible": true
      }
    },
    {
      "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": "a[href*='auto-occasion-annonce-']",
        "fileName": "lacentrale-data-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "titre",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const card = e || ROW; const lines = (card.innerText || ROW.innerText || '').split(/\\n+/).map(s => s.trim()).filter(Boolean); const direct = card.querySelector('h2, h3, [data-testid*=\"title\" i], [class*=\"title\" i]'); return (direct && direct.textContent.trim()) || lines[0] || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "sous_titre",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const card = e || ROW; const lines = (card.innerText || ROW.innerText || '').split(/\\n+/).map(s => s.trim()).filter(Boolean); return lines.find((t, idx) => idx > 0 && /\\d|TDI|HDI|DIG|PURETECH|AMG|BUSINESS|TEKNA|LIFE|BLUEHDI|PHEV|HYBRID|DCI|TSI|E-TECH/i.test(t) && !/€|km|garantie|livraison/i.test(t)) || lines[1] || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "annee",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/\\b(19|20)\\d{2}\\b/); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "kilometrage",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/\\b\\d[\\d\\s.\\u00a0]*\\s*km\\b/i); return m ? m[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "boite_de_vitesse",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/\\b(Automatique|Manuelle|Semi-automatique|Robotisée|Robotisee)\\b/i); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "energie",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/\\b(Diesel|Essence|Hybride|Hybrides|Électrique|Electrique|GPL|Ethanol|Bioéthanol|Bioethanol|Hydrogène|Hydrogene)\\b/i); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prix_1",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || '').replace(/\\b\\d{1,4}\\s*€\\s*\\/\\s*mois\\b/i, ''); const m = text.match(/\\b\\d{1,3}(?:[\\s.\\u00a0]\\d{3})*\\s*€/); return m ? m[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prix_2",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/\\b\\d{1,4}\\s*€\\s*\\/\\s*mois\\b/i); return m ? m[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "etiquette_1",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/(Très bonne affaire|Tres bonne affaire|Bonne affaire|Offre équitable|Offre equitable|Analyse indisponible|Prix élevé|Prix eleve|Sous le marché|Sous le marche)/i); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "garantie",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); const m = text.match(/Garantie\\s+\\d+\\s+mois/i); return m ? m[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "livraison",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const text = ((e || ROW).innerText || ROW.innerText || ''); return /\\bLivraison\\b/i.test(text) ? 'Livraison' : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "photo_url",
            "selector": "(() => { let e = ROW; for (let i = 0; i < 8 && e; i++, e = e.parentElement) { const t = e.innerText || ''; if (t.length > 40 && /€|km/i.test(t)) break; } const card = e || ROW; const img = ROW.querySelector('img') || card.querySelector('img[src*=\"image-annonce\"], img[data-src*=\"image-annonce\"], img'); if (!img) return ''; const raw = img.currentSrc || img.src || img.getAttribute('data-src') || img.getAttribute('src') || ''; try { return raw ? new URL(raw, location.href).href : ''; } catch (err) { return raw; } })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "url_de_la_page_detaillee",
            "selector": "(() => { const raw = ROW.getAttribute('href') || ROW.href || ''; try { return raw ? new URL(raw, location.href).href : ''; } catch (err) { return raw; } })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "element-exists-2",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2304,
      "position_y": 800,
      "config": {
        "selector": "a[rel='next'], a[aria-label*='Suivant' i]:not([aria-disabled='true']):not(.disabled), a[aria-label*='Page suivante' i]:not([aria-disabled='true']):not(.disabled), button[aria-label*='Suivant' i]:not([disabled]):not(.disabled), button[aria-label*='Page suivante' i]:not([disabled]):not(.disabled)"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2640,
      "position_y": 800,
      "config": {
        "selector": "a[rel='next'], a[aria-label*='Suivant' i]:not([aria-disabled='true']):not(.disabled), a[aria-label*='Page suivante' i]:not([aria-disabled='true']):not(.disabled), button[aria-label*='Suivant' i]:not([disabled]):not(.disabled), button[aria-label*='Page suivante' i]:not([disabled]):not(.disabled)",
        "timeout": 10
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 2976,
      "position_y": 800,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3312,
      "position_y": 800,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "end-2",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 3648,
      "position_y": 800,
      "config": {}
    }
  ],
  "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": "take-screenshot-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "take-screenshot-1",
      "from_connector_id": "right",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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": "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": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "false",
      "to_block_id": "end-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-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": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-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": 3512,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "wait-for-page-load-2",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 720,
      "position_y": 116,
      "width": 2168,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "element-exists-2",
          "click-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1056,
      "position_y": 416,
      "width": 1160,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "take-screenshot-1",
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 1392,
      "position_y": 416,
      "width": 2504,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1",
          "end-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 720,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort scraper for La Centrale listing pages. Extracts vehicle title, subtitle, year, mileage, transmission, fuel, prices, deal label, warranty, delivery flag, photo URL, and detail-page URL when listing pages are accessible. La Centrale returned DataDome CAPTCHA/403 during analysis and autonomous testing; if CAPTCHA is detected, this template saves a screenshot and ends gracefully because UScraper cannot bypass CAPTCHA. If access is allowed, it scrapes all reachable listing pages using a next-button pagination loop and appends to lacentrale-data-scraper.csv.",
      "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 `iframe[src*='captcha-delivery.com'], iframe[title*='DataDome'], script[src*='captcha-delivery.com'], [src*='captcha-deli`. 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-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => { const labels = ['accepter', 'accept', 'tout accepter', 'j’accepte', \"j'accepte\"]; const but...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 992,
      "position_y": 500,
      "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": "Structured export with JS columns (titre, sous_titre, annee, kilometrage, boite_de_vitesse). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2168,
      "position_y": 780,
      "width": 340,
      "height": 132,
      "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[rel='next'], a[aria-label*='Suivant' i]:not([aria-disabled='true']):not(.disabled), a[aria-label*='Page suivante' i]:n`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2504,
      "position_y": 780,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-2"
      }
    },
    {
      "id": "note-block-click-1",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 780,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-1"
      }
    }
  ]
}