{
  "version": "1.0.0",
  "exported_at": "2026-06-01T07:05:00.000Z",
  "project": {
    "name": "Immobiliare Real Estate Detail Scraper",
    "description": "Best-effort Immobiliare.it real estate detail scraper equivalent to the Octoparse template. It processes multiple Immobiliare detail page URLs via navigate.urls[], extracts one property row per URL, appends results to crawler-dettagli-immobili-immobiliare.csv, and continues through the URL list with loop-continue. Note: attached analysis showed Immobiliare.it returning HTTP 403 DataDome CAPTCHA/device-check pages, so this template requires an accessible browser session, solved challenge, or suitable proxy to extract real page data.",
    "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": 260,
      "config": {
        "urls": [
          "https://www.immobiliare.it/annunci/106718379/",
          "https://www.immobiliare.it/annunci/109468067/",
          "https://www.immobiliare.it/annunci/108553385/",
          "https://www.immobiliare.it/annunci/105347955/",
          "https://www.immobiliare.it/annunci/109974543/"
        ],
        "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": 260,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 260,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "jsCode": "Array.from(document.querySelectorAll('button,[role=button]')).filter(b => /mostra|leggi|espandi|continua/i.test((b.innerText || b.textContent || '').trim())).slice(0,3).forEach(b => b.click());",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "duration": 1,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 260,
      "config": {
        "rowSelector": "body",
        "fileName": "crawler-dettagli-immobili-immobiliare.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "url_inserito",
            "selector": "(() => (location.href || '').trim())()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "titolo_appartamento",
            "selector": "(() => (document.querySelector('h1')?.innerText || document.querySelector(`meta[property='og:title']`)?.content || document.title || '').trim())()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prezzo",
            "selector": "(() => { const el = document.querySelector('[data-cy=adPageHeader-price], .im-titleBlock__price, .nd-price'); const m = document.body.innerText.match(/€\\s*[0-9][0-9.\\s]*/); return (el?.innerText || m?.[0] || '').trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posizione",
            "selector": "(() => (document.querySelector('[data-cy=adPageHeader-location], [data-testid=location], address, .im-address__content')?.innerText || '').trim())()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "agenzia",
            "selector": "(() => { const a = document.querySelector(`a[href*='/agenzie-immobiliari/']`); return (document.querySelector('[data-cy=advertiser-name]')?.innerText || a?.innerText || '').trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "telefono_agenzia",
            "selector": "(() => { const a = document.querySelector('a[href^=tel]'); const visiblePhone = document.body.innerText.match(/(?:\\+39\\s*)?0\\d{1,3}[\\s.\\-]?\\d{3,}/); return (a ? (a.innerText || a.getAttribute('href').replace('tel:', '')) : (visiblePhone?.[0] || '')).trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "agenzia_url",
            "selector": "(() => { const a = document.querySelector(`a[href*='/agenzie-immobiliari/']`); return a ? new URL(a.getAttribute('href'), location.href).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "titolo_descrizione",
            "selector": "(() => (document.querySelector('[data-cy=adPageDescription-title], .in-realEstateDescription__title')?.innerText || '').trim())()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "contenuto_descrizione",
            "selector": "(() => (document.querySelector('[data-cy=adPageDescription-description], .in-realEstateDescription__description, #description')?.innerText || document.querySelector(`meta[name='description']`)?.content || '').trim())()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "riferimento_e_data_annuncio",
            "selector": "(() => { const t = document.body.innerText; const ref = (t.match(/Riferimento\\s*(?:e data annuncio)?\\s*\\n?\\s*([^\\n]+)/i) || [])[1] || ''; const date = (t.match(/\\b\\d{1,2}\\/\\d{1,2}\\/\\d{4}\\b/) || [])[0] || ''; return (ref && date && !ref.includes(date)) ? (ref.trim() + ' - ' + date.trim()) : (ref || date).trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "superficie",
            "selector": "(() => { const t = document.body.innerText; const m = t.match(/Superficie\\s*\\n?\\s*([^\\n]+)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "locali",
            "selector": "(() => { const t = document.body.innerText; const m = t.match(/Locali\\s*\\n?\\s*([^\\n]+)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "piano",
            "selector": "(() => { const t = document.body.innerText; const m = t.match(/(?:^|\\n)Piano\\s*\\n?\\s*([^\\n]+)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "totale_piani_edificio",
            "selector": "(() => { const t = document.body.innerText; const m = t.match(/Totale piani(?: edificio)?\\s*\\n?\\s*([^\\n]+)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "disponibilita",
            "selector": "(() => { const t = document.body.innerText; const m = t.match(/Disponibilit[àa]\\s*\\n?\\s*([^\\n]+)/i); return m ? m[1].trim() : ''; })()",
            "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": 260,
      "config": {
        "color": "bg-[#ff832b]"
      }
    }
  ],
  "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-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": "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": 156,
      "width": 2120,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 156,
      "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": 156,
      "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": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Immobiliare.it real estate detail scraper equivalent to the Octoparse template. It processes multiple Immobiliare detail page URLs via navigate.urls[], extracts one property row per URL, appends results to crawler-dettagli-immobili-immobiliare.csv, and continues through the URL list with loop-continue. Note: attached analysis showed Immobiliare.it returning HTTP 403 DataDome CAPTCHA/device-check pages, so this template requires an accessible browser session, solved challenge, or suitable proxy to extract real page data.",
      "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: `Array.from(document.querySelectorAll('button,[role=button]')).filter(b => /mostra|leggi|espandi|cont...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 240,
      "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 (url_inserito, titolo_appartamento, prezzo, posizione, agenzia). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 240,
      "width": 340,
      "height": 134,
      "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": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    },
    {
      "id": "note-datadome-risk",
      "element_type": "note",
      "title": "DataDome / CAPTCHA limitation",
      "content": "The attached page analysis returned HTTP 403 and DataDome CAPTCHA/device-check iframes. This template is best-effort and may require a solved browser profile, lower-volume use, or a suitable proxy before real Immobiliare fields are visible.",
      "color": "#da1e28",
      "position_x": 840,
      "position_y": 480,
      "width": 520,
      "height": 140,
      "z_index": 22,
      "block_id": null,
      "connection_id": null,
      "data": {
        "minimized": false
      }
    }
  ]
}