{
  "version": "1.0.0",
  "exported_at": "2026-06-02T17:00:00.000Z",
  "project": {
    "name": "Seloger biens Ã  vendre Scraper",
    "description": "Scrapes SeLoger real-estate detail pages supplied as input URLs and exports property information equivalent to the Octoparse template: agency, price, price per m², type, features, address, descriptions, photo, phone and rating. Navigation strategy: multi-URL detail-page loop using navigate.urls[] + loop-continue with CSV append mode. Best-effort template: live analysis returned HTTP 403 DataDome CAPTCHA/device check, so extraction uses resilient JavaScript fallbacks and may require a trusted browser profile, solved CAPTCHA, cookies or proxy.",
    "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": {
        "urls": [
          "https://www.seloger.com/annonces/achat/maison/le-thillay-95/207921049.htm",
          "https://www.seloger.com/annonces/achat-de-prestige/maison/paris-15eme-75/alleray-procession/209469743.htm",
          "https://www.seloger.com/annonces/viagers/maison/eaubonne-95/la-cerisaie/210295449.htm"
        ],
        "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": 480,
      "position_y": 220,
      "config": {
        "timeout": 45
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "jsCode": "(() => {\n  const patterns = /(accepter|accept|tout accepter|continuer|voir le numéro|afficher le numéro|téléphone|telephone|lire la suite|voir plus|show phone|contact)/i;\n  const candidates = Array.from(document.querySelectorAll('button, a, [role=\"button\"]'));\n  for (const el of candidates) {\n    const text = (el.innerText || el.textContent || el.getAttribute('aria-label') || '').trim();\n    if (patterns.test(text)) {\n      try { el.click(); } catch (e) {}\n    }\n  }\n  try { window.scrollTo(0, document.body.scrollHeight / 2); } catch (e) {}\n  setTimeout(() => { try { window.scrollTo(0, 0); } catch (e) {} }, 500);\n  return true;\n})()",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "rowSelector": "body",
        "fileName": "seloger-scraper-bien-a-vendre.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "agences_immobilieres",
            "selector": "(() => { const txt = document.body.innerText || ''; const scripts = Array.from(document.scripts).map(s => s.textContent || '').join('\\n'); const pick = (sels) => { for (const sel of sels) { const el = document.querySelector(sel); const v = el && (el.innerText || el.textContent || '').trim(); if (v && v.length < 120) return v; } return ''; }; const dom = pick(['[data-testid*=\"agency\" i]', '[data-test*=\"agency\" i]', '[class*=\"Agency\"]', '[class*=\"agency\"]', '[class*=\"Professional\"]', '[class*=\"professional\"]']); if (dom) return dom; const all = txt + '\\n' + scripts; const m = all.match(/\"(?:agencyName|accountName|brandName|name)\"\\s*:\\s*\"([^\"{}]{2,120})\"/i); return m ? m[1].replace(/\\\\u002F/g, '/').replace(/\\\\\"/g, '\"') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prix_total",
            "selector": "(() => { const pick = (sels) => { for (const sel of sels) { const el = document.querySelector(sel); const v = el && (el.innerText || el.textContent || '').trim(); if (v && /€/.test(v)) return v; } return ''; }; const dom = pick(['[data-testid*=\"price\" i]', '[data-test*=\"price\" i]', '[class*=\"Price\"]', '[class*=\"price\"]']); if (dom) { const m = dom.match(/\\d[\\d\\s\\u00a0.]*\\s*€/); if (m) return m[0].replace(/\\s+/g, ' ').trim(); } const txt = document.body.innerText || ''; const m = txt.match(/\\d[\\d\\s\\u00a0.]*\\s*€/); return m ? m[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prixunitaire_m2",
            "selector": "(() => { const txt = document.body.innerText || ''; const m = txt.match(/\\d[\\d\\s\\u00a0.]*\\s*€\\s*(?:\\/|par)?\\s*m[²2]/i); return m ? m[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type_de_logement",
            "selector": "(() => { const txt = document.body.innerText || ''; const title = (document.querySelector('h1') && document.querySelector('h1').innerText) || document.title || txt.slice(0, 500); const m = title.match(/(Maison\\s*\\/\\s*Villa|Maison de ville|Appartement|Pavillon|Maison|Villa|Studio|Loft|Terrain|Viager|Propriété|Hôtel particulier)/i) || txt.match(/(Maison\\s*\\/\\s*Villa|Maison de ville|Appartement|Pavillon|Maison|Villa|Studio|Loft|Terrain|Viager|Propriété|Hôtel particulier)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "tag",
            "selector": "(() => { const txt = document.body.innerText || ''; const matches = Array.from(txt.matchAll(/\\b\\d+\\s*(?:pièces?|chambres?|m²|m2)|Terrain\\s+\\d+\\s*m[²2]|Étage\\s+\\d+\\s*\\/\\s*\\d+|Parking|Jardin|Box|Garage|Balcon|Terrasse|Cave|Piscine|Viager occupé/gi)).map(m => m[0].replace(/\\s+/g, ' ').trim()); return Array.from(new Set(matches)).slice(0, 20).join(';'); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "adresse",
            "selector": "(() => { const pick = (sels) => { for (const sel of sels) { const el = document.querySelector(sel); const v = el && (el.innerText || el.textContent || '').trim(); if (v && /\\d{5}|Paris|Lyon|Marseille|Bordeaux|Lille|Nice|Toulouse/i.test(v)) return v.replace(/\\s+/g, ' '); } return ''; }; const dom = pick(['[data-testid*=\"address\" i]', '[data-test*=\"address\" i]', '[class*=\"Address\"]', '[class*=\"address\"]', '[class*=\"Localisation\"]', '[class*=\"localisation\"]']); if (dom) return dom; const lines = (document.body.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); const line = lines.find(l => /\\b\\d{5}\\b/.test(l) && l.length < 140); return line || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "description",
            "selector": "(() => { const els = Array.from(document.querySelectorAll('[data-testid*=\"description\" i], [data-test*=\"description\" i], [class*=\"Description\"], [class*=\"description\"], section, article')); const texts = els.map(e => (e.innerText || e.textContent || '').trim()).filter(t => t.length > 80).sort((a,b) => b.length - a.length); if (texts[0]) return texts[0].replace(/\\s+/g, ' ').slice(0, 1000); const txt = document.body.innerText || ''; return txt.replace(/\\s+/g, ' ').slice(0, 1000); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "url_du_page_detaille",
            "selector": "(() => window.location.href)()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "description_du_professionnel",
            "selector": "(() => { const scripts = Array.from(document.scripts).map(s => s.textContent || '').join('\\n'); const jsonDesc = scripts.match(/\"description\"\\s*:\\s*\"([\\s\\S]{80,5000}?)\"\\s*[,}]/i); if (jsonDesc) return jsonDesc[1].replace(/\\\\n/g, ' ').replace(/\\\\u002F/g, '/').replace(/\\\\\"/g, '\"').replace(/\\s+/g, ' ').trim(); const els = Array.from(document.querySelectorAll('[data-testid*=\"description\" i], [class*=\"Description\"], [class*=\"description\"]')); const texts = els.map(e => (e.innerText || '').trim()).filter(t => t.length > 120).sort((a,b) => b.length - a.length); return texts[0] ? texts[0].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "annee_de_construction",
            "selector": "(() => { const txt = document.body.innerText || ''; const m = txt.match(/Construit(?:e)?\\s+en\\s+(\\d{4})/i) || txt.match(/Ann[ée]e\\s+de\\s+construction\\s*:?\\s*(\\d{4})/i) || txt.match(/\\b(?:construit|construction)[^\\d]{0,30}(\\d{4})\\b/i); return m ? ('Construit en ' + m[1]) : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "exposition",
            "selector": "(() => { const txt = document.body.innerText || ''; const m = txt.match(/Exposition\\s*:?\\s*([^\\n;,\\.]{2,40})/i); return m ? ('Exposition ' + m[1].replace(/\\s+/g, ' ').trim()) : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ascenseur",
            "selector": "(() => { const txt = document.body.innerText || ''; const m = txt.match(/Ascenseur\\s*:?\\s*(Oui|Non)?/i); if (m) return m[1] ? ('Ascenseur ' + m[1]) : 'Ascenseur'; return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "photo",
            "selector": "(() => { const img = Array.from(document.images).map(i => i.currentSrc || i.src || '').find(src => /v\\.seloger\\.com|visuels|photo/i.test(src)); if (img) return img; const scripts = Array.from(document.scripts).map(s => s.textContent || '').join('\\n'); const m = scripts.match(/https?:\\\\?\\/\\\\?\\/v\\.seloger\\.com[^\"'\\\\\\s]+/i) || scripts.match(/https?:\\/\\/v\\.seloger\\.com[^\"'\\s]+/i); return m ? m[0].replace(/\\\\u002F/g, '/').replace(/\\\\\\//g, '/') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "telephone",
            "selector": "(() => { const txt = document.body.innerText || ''; const m = txt.match(/\\b0[1-9](?:[ .-]?\\d{2}){4}\\b/); return m ? m[0].replace(/[.-]/g, ' ').replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating",
            "selector": "(() => { const pick = (sels) => { for (const sel of sels) { const el = document.querySelector(sel); const v = el && (el.innerText || el.textContent || el.getAttribute('aria-label') || '').trim(); if (v && /[0-5][,.][0-9]/.test(v)) return v.match(/[0-5][,.][0-9]/)[0]; } return ''; }; const dom = pick(['[data-testid*=\"rating\" i]', '[data-test*=\"rating\" i]', '[class*=\"rating\" i]', '[aria-label*=\"note\" i]', '[aria-label*=\"rating\" i]']); if (dom) return dom; const txt = document.body.innerText || ''; const m = txt.match(/(?:note|avis|rating)[^0-9]{0,20}([0-5][,.][0-9])/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2640,
      "position_y": 220,
      "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": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-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": "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"
    },
    {
      "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-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 2120,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1128,
      "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": 2208,
      "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": 2568,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes SeLoger real-estate detail pages supplied as input URLs and exports property information equivalent to the Octoparse template: agency, price, price per m², type, features, address, descriptions, photo, phone and rating. Navigation strategy: multi-URL detail-page loop using navigate.urls[] + loop-continue with CSV append mode. Best-effort template: live analysis returned HTTP 403 DataDome CAPTCHA/device check, so extraction uses resilient JavaScript fallbacks and may require a trusted browser profile, solved CAPTCHA, cookies or proxy.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => {\n  const patterns = /(accepter|accept|tout accepter|continuer|voir le numéro|afficher le num...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1400,
      "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": "Structured export with JS columns (agences_immobilieres, prix_total, prixunitaire_m2, type_de_logement, tag). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 340,
      "height": 138,
      "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": 2840,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}