{
  "version": "1.0.0",
  "exported_at": "2026-06-01T00:00:00.000Z",
  "project": {
    "name": "Immobiliare Real Estate Listing Scraper Local Only",
    "description": "Scrapes Immobiliare.it real-estate search result pages and exports listing type, location, title, URL, price, rooms, surface, bathrooms, floor, and description. This template mirrors the Octoparse local-only workflow: users provide one or more Immobiliare.it search-result URLs in navigate.urls[], all rows are appended to crawler-lista-immobili-immobiliare.csv, and result-page pagination is followed via the next-page link. IMPORTANT: autonomous tests consistently reached Immobiliare.it DataDome CAPTCHA/403 pages, so no listing DOM was available. Run this template in visible/local browser mode and solve the CAPTCHA manually if shown. If DataDome remains unresolved, the template skips the blocked URL and exits/continues cleanly.",
    "color": "bg-[#42be65]",
    "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.immobiliare.it/vendita-case/firenze/zona-firenze-sud/?criterio=rilevanza"
        ],
        "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": 45
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "duration": 8
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "selector": "a[href*=\"/annunci/\"]"
      }
    },
    {
      "block_id": "element-exists-2",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1128,
      "position_y": 520,
      "config": {
        "selector": "iframe[src*=\"captcha-delivery.com\"], iframe[title*=\"DataDome\"], iframe[title*=\"CAPTCHA\"], script[src*=\"captcha-delivery.com\"], script[src*=\"ct.captcha-delivery.com\"]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1632,
      "position_y": 800,
      "config": {
        "duration": 180
      }
    },
    {
      "block_id": "refresh-1",
      "block_type": "process",
      "title": "Refresh",
      "description": "Refresh current page",
      "position_x": 1968,
      "position_y": 800,
      "config": {}
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 2304,
      "position_y": 800,
      "config": {
        "timeout": 45
      }
    },
    {
      "block_id": "element-exists-3",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2640,
      "position_y": 800,
      "config": {
        "selector": "a[href*=\"/annunci/\"]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "rowSelector": "a[href*=\"/annunci/\"]",
        "fileName": "crawler-lista-immobili-immobiliare.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "tipo_immobili",
            "selector": "(() => { const crumbs = Array.from(document.querySelectorAll('nav a, [aria-label*=breadcrumb] a')).map(e => e.textContent.replace(/\\s+/g, ' ').trim()).filter(Boolean); return crumbs.find(t => /case|appartamenti|immobili|vendita/i.test(t)) || 'Case - Appartamenti'; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posizione",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const el = card.querySelector('.in-listingCardLocation, .in-card__location, [data-cy*=location], [data-testid*=location], [class*=Location], [class*=location]'); if (el) return el.textContent.replace(/\\s+/g, ' ').trim(); const text = ((ROW.textContent || ROW.getAttribute('title') || '') + ' ' + (card.textContent || '')).replace(/\\s+/g, ' ').trim(); const parts = text.split(',').map(s => s.trim()).filter(Boolean); return parts.length >= 2 ? parts.slice(-2).join(', ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "appartamento_titolo",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const titleEl = card.querySelector('a[href*=\"/annunci/\"][title], h2 a[href*=\"/annunci/\"], h3 a[href*=\"/annunci/\"], a[href*=\"/annunci/\"]'); return ((titleEl && (titleEl.textContent || titleEl.getAttribute('title'))) || ROW.textContent || ROW.getAttribute('title') || ROW.getAttribute('aria-label') || '').replace(/\\s+/g, ' ').trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "appartamento_titolo_URL",
            "selector": "(() => { return ROW.href || ROW.getAttribute('href') || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "prezzo",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const el = card.querySelector('.in-listingCardPrice, .in-card__price, [data-cy*=price], [data-testid*=price], [class*=Price], [class*=price]'); const text = (el ? el.textContent : card.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/€\\s?[\\d\\.\\,]+|Prezzo\\s*su\\s*richiesta/i); return m ? m[0].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "locale",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const text = card.innerText || card.textContent || ''; const items = Array.from(card.querySelectorAll('.in-listingCardFeatureList__item, .in-feat__item, [class*=FeatureList] li, [class*=features] li, li, span')).map(e => e.textContent.replace(/\\s+/g, ' ').trim()).filter(Boolean); const found = items.find(t => /\\d+\\+?\\s*local[ei]/i.test(t)) || (text.match(/\\d+\\+?\\s*local[ei]/i) || [''])[0]; return found || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "superficie",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const text = card.innerText || card.textContent || ''; const items = Array.from(card.querySelectorAll('.in-listingCardFeatureList__item, .in-feat__item, [class*=FeatureList] li, [class*=features] li, li, span')).map(e => e.textContent.replace(/\\s+/g, ' ').trim()).filter(Boolean); const found = items.find(t => /\\d+(?:[\\.,]\\d+)?\\s*m²/i.test(t)) || (text.match(/\\d+(?:[\\.,]\\d+)?\\s*m²/i) || [''])[0]; return found || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "bagno",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const text = card.innerText || card.textContent || ''; const items = Array.from(card.querySelectorAll('.in-listingCardFeatureList__item, .in-feat__item, [class*=FeatureList] li, [class*=features] li, li, span')).map(e => e.textContent.replace(/\\s+/g, ' ').trim()).filter(Boolean); const found = items.find(t => /\\d+\\s*bagn[io]/i.test(t)) || (text.match(/\\d+\\s*bagn[io]/i) || [''])[0]; return found || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "piano",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const text = card.innerText || card.textContent || ''; const items = Array.from(card.querySelectorAll('.in-listingCardFeatureList__item, .in-feat__item, [class*=FeatureList] li, [class*=features] li, li, span')).map(e => e.textContent.replace(/\\s+/g, ' ').trim()).filter(Boolean); const found = items.find(t => /^piano|\\bpiano\\b/i.test(t)) || (text.match(/Piano\\s+[^•,\\n]+/i) || [''])[0]; return found ? found.replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "descrizione",
            "selector": "(() => { const card = ROW.closest('li, article, [class*=card], [class*=Card], [class*=listing], [class*=Listing]') || ROW.closest('div') || ROW; const candidates = Array.from(card.querySelectorAll('.in-listingCardDescription, .in-card__description, [data-cy*=description], [data-testid*=description], [class*=Description], [class*=description], p')).map(e => e.textContent.replace(/\\s+/g, ' ').trim()).filter(t => t.length > 40); candidates.sort((a, b) => b.length - a.length); if (candidates[0]) return candidates[0]; const text = (card.innerText || card.textContent || '').replace(/\\s+/g, ' ').trim(); return text.length > 120 ? text.slice(0, 1200) : ''; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "element-exists-4",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "selector": "a[rel=\"next\"], a[aria-label*=\"successiva\" i], a[aria-label*=\"pagina successiva\" i], .in-pagination__item--next:not(.is-disabled) a[href]"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2136,
      "position_y": 520,
      "config": {
        "selector": "a[rel=\"next\"], a[aria-label*=\"successiva\" i], a[aria-label*=\"pagina successiva\" i], .in-pagination__item--next:not(.is-disabled) a[href]",
        "timeout": 20
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2472,
      "position_y": 520,
      "config": {
        "duration": 4
      }
    },
    {
      "block_id": "wait-for-page-load-3",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 2808,
      "position_y": 520,
      "config": {
        "timeout": 45
      }
    },
    {
      "block_id": "element-exists-5",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 3144,
      "position_y": 758,
      "config": {
        "selector": "a[href*=\"/annunci/\"]"
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 3144,
      "position_y": 520,
      "config": {}
    },
    {
      "block_id": "loop-continue-2",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2976,
      "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": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-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": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "element-exists-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "true",
      "to_block_id": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "false",
      "to_block_id": "loop-continue-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "refresh-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "refresh-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": "element-exists-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-3",
      "from_connector_id": "true",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-3",
      "from_connector_id": "false",
      "to_block_id": "loop-continue-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "element-exists-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-4",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-4",
      "from_connector_id": "false",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "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-page-load-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-3",
      "from_connector_id": "right",
      "to_block_id": "element-exists-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-5",
      "from_connector_id": "true",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-5",
      "from_connector_id": "false",
      "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": 3008,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2",
          "refresh-1",
          "wait-for-page-load-2",
          "sleep-3",
          "wait-for-page-load-3"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1056,
      "position_y": 116,
      "width": 2336,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "element-exists-2",
          "element-exists-3",
          "element-exists-4",
          "click-1",
          "element-exists-5",
          "loop-continue-1",
          "loop-continue-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1392,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Immobiliare.it real-estate search result pages and exports listing type, location, title, URL, price, rooms, surface, bathrooms, floor, and description. This template mirrors the Octoparse local-only workflow: users provide one or more Immobiliare.it search-result URLs in navigate.urls[], all rows are appended to crawler-lista-immobili-immobiliare.csv, and result-page pagination is followed via the next-page link. IMPORTANT: autonomous tests consistently reached Immobiliare.it DataDome CAPTCHA/403 pages, so no listing DOM was available. Run this template in visible/local browser mode and solve the CAPTCHA manually if shown. If DataDome remains unresolved, the template skips the blocked URL and exits/continues cleanly.",
      "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 `a[href*=\"/annunci/\"]`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1328,
      "position_y": 200,
      "width": 340,
      "height": 137,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-element-exists-2",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `iframe[src*=\"captcha-delivery.com\"], iframe[title*=\"DataDome\"], iframe[title*=\"CAPTCHA\"], script[src*=\"captcha-delivery.`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1328,
      "position_y": 500,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-2"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (tipo_immobili, posizione, appartamento_titolo, appartamento_titolo_URL, prezzo). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1664,
      "position_y": 500,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-element-exists-4",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `a[rel=\"next\"], a[aria-label*=\"successiva\" i], a[aria-label*=\"pagina successiva\" i], .in-pagination__item--next:not(.is-d`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 500,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-4"
      }
    },
    {
      "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": 2336,
      "position_y": 500,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-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": 3344,
      "position_y": 500,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    },
    {
      "id": "note-block-loop-continue-2",
      "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": 3176,
      "position_y": 780,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-2"
      }
    }
  ]
}