{
  "version": "1.0.0",
  "exported_at": "2026-06-03T05:00:00.000Z",
  "project": {
    "name": "TecnoCasa Scraper by URL",
    "description": "Extracts TecnoCasa real-estate listing data from https://www.tecnocasa.es/venta/inmuebles/comunidad-valenciana/valencia.html. Fields match the Octoparse preview: titulo, titulo_url, imagen, precio, estado, estado1, estado2, estado3. The workflow scrolls through the listing page first to trigger lazy-loaded images, normalizes TecnoCasa property cards into hidden rows, exports the first page with create mode, then follows a detected next-page control and appends subsequent pages if pagination is available. CAPTCHA or bot protection may require manual solving.",
    "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.tecnocasa.es/venta/inmuebles/comunidad-valenciana/valencia.html",
        "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": 30
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "scroll-1",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "direction": "down",
        "amount": 1600
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "scroll-2",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "direction": "down",
        "amount": 1600
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "scroll-3",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 2640,
      "position_y": 220,
      "config": {
        "direction": "up",
        "amount": 4000
      }
    },
    {
      "block_id": "sleep-4",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3000,
      "position_y": 220,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 3360,
      "position_y": 220,
      "config": {
        "waitForCompletion": true,
        "timeout": 15,
        "jsCode": "(function(){const C='uscraper-tecnocasa-results';document.getElementById(C)?.remove();document.querySelectorAll('#uscraper-tecnocasa-next').forEach(e=>e.removeAttribute('id'));const abs=u=>{try{return new URL(u||'',location.href).href}catch(e){return u||''}};const clean=s=>(s||'').replace(/\\s+/g,' ').trim();const text=e=>clean((e&&(e.innerText||e.textContent))||'');const pick=(r,s)=>{try{return text(r.querySelector(s))}catch(e){return''}};const priceRe=/\\d[\\d.]*\\s*€/;const d1=/(\\d+\\s*(?:dorm\\.?|hab\\.?|habitaci[oó]n(?:es)?))/i;const d2=/(\\d+(?:[.,]\\d+)?\\s*m(?:2|²))/i;const d3=/(\\d+\\s*bañ(?:o|os)?)/i;function splitTitle(raw){raw=clean(raw);let m=raw.match(/^(.+?\\b(?:en venta|en alquiler))\\s+(.+)$/i);if(m)return{title:clean(m[1]),estado:clean(m[2])};return{title:raw,estado:''}}function chooseCard(a){let best=a;for(let p=a;p&&p!==document.body;p=p.parentElement){const t=text(p);let score=0;if(priceRe.test(t))score+=2;if(p.querySelector('img,source,picture'))score+=1;if(t.length>20&&t.length<2500)score+=1;if(t.length>2500)score-=2;if(score>=3){best=p;break}}return best}function realFromVal(v){v=clean(v);if(!v||/^data:image\\//i.test(v))return'';if(v.includes(','))v=v.split(',')[0].trim().split(/\\s+/)[0];else v=v.split(/\\s+/)[0];return abs(v)}function imgUrl(card){const imgs=Array.from(card.querySelectorAll('img,source'));const attrs=['data-src','data-lazy','data-original','data-srcset','data-lazy-src','data-full','srcset','src'];for(const el of imgs){for(const at of attrs){const u=realFromVal(el.getAttribute(at));if(u&&/cdn-media\\.medialabtc\\.it|gallery_media|\\.(?:jpe?g|png|webp)(?:\\?|$)/i.test(u))return u}}const html=card.outerHTML||'';let m=html.match(/https?:\\/\\/cdn-media\\.medialabtc\\.it[^\"'\\s<>]+(?:jpe?g|png|webp)/i)||html.match(/\\/es\\/agencies\\/[^\"'\\s<>]+(?:jpe?g|png|webp)/i);if(m)return abs(m[0].replace(/&amp;/g,'&'));for(const el of imgs){const fallback=realFromVal(el.getAttribute('src'));if(fallback)return fallback}return''}function linesOf(el){return((el.innerText||el.textContent||'').split(/\\n+/).map(clean).filter(Boolean))}const links=Array.from(document.querySelectorAll('a[href]')).filter(a=>{try{return /\\/venta\\/.+\\/\\d+\\.html$/.test(new URL(abs(a.getAttribute('href'))).pathname)}catch(e){return false}});const seen=new Set(),rows=[];for(const a of links){const url=abs(a.getAttribute('href')).split('#')[0];if(seen.has(url))continue;seen.add(url);const card=chooseCard(a),all=text(card),lines=linesOf(card);let raw=pick(card,'h1,h2,h3,h4,[class*=\"title\"],[class*=\"titulo\"],[class*=\"typology\"],[class*=\"type\"]')||text(a)||lines.find(l=>/(en venta|en alquiler)/i.test(l))||'';let sp=splitTitle(raw);let title=sp.title,estado=pick(card,'[class*=\"location\"],[class*=\"address\"],[class*=\"zone\"],[class*=\"city\"],[class*=\"municipio\"],[class*=\"localidad\"]')||sp.estado;if(!estado||priceRe.test(estado)||d1.test(estado)||d2.test(estado)||d3.test(estado)||estado===title){estado=sp.estado||lines.find(l=>/,/.test(l)&&!priceRe.test(l)&&!d1.test(l)&&!d2.test(l)&&!d3.test(l)&&l!==title)||''}if(!estado&&sp.estado)estado=sp.estado;const price=(all.match(priceRe)||[''])[0];rows.push({title:title||'',url:url,image:imgUrl(card),price:price||'',estado:estado||'',estado1:(all.match(d1)||[''])[0],estado2:(all.match(d2)||[''])[0],estado3:(all.match(d3)||[''])[0]})}const box=document.createElement('div');box.id=C;box.style.cssText='position:absolute;left:-10000px;top:0;width:10px;min-height:10px;overflow:hidden;z-index:-1;';for(const r of rows){const d=document.createElement('div');d.className='uscraper-tecnocasa-row';d.textContent='.';d.setAttribute('data-title',r.title);d.setAttribute('data-url',r.url);d.setAttribute('data-image',r.image);d.setAttribute('data-price',r.price);d.setAttribute('data-estado',r.estado);d.setAttribute('data-estado1',r.estado1);d.setAttribute('data-estado2',r.estado2);d.setAttribute('data-estado3',r.estado3);box.appendChild(d)}document.body.appendChild(box);const disabled=el=>el.disabled||el.getAttribute('aria-disabled')==='true'||/disabled|inactive|not-allowed/i.test(el.className||'');let cand=Array.from(document.querySelectorAll('a[href],button'));let next=cand.find(el=>{if(disabled(el))return false;const s=((el.getAttribute('rel')||'')+' '+(el.getAttribute('aria-label')||'')+' '+(el.getAttribute('title')||'')+' '+text(el)+' '+(el.className||'')).toLowerCase();return /(^|\\s)next(\\s|$)|siguiente|página siguiente|pagina siguiente|›|»/.test(s)});if(!next){const active=document.querySelector('[aria-current=\"page\"],.active,.current');const sib=active&&active.parentElement&&active.parentElement.nextElementSibling;next=sib&&Array.from(sib.querySelectorAll('a[href],button')).find(el=>!disabled(el))}if(next)next.id='uscraper-tecnocasa-next';return{rows:rows.length,next:!!next};})();"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 3720,
      "position_y": 220,
      "config": {
        "selector": ".uscraper-tecnocasa-row",
        "timeout": 20,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 4080,
      "position_y": 220,
      "config": {
        "rowSelector": ".uscraper-tecnocasa-row",
        "fileName": "tecnocasa_scraper_url.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "create",
        "columns": [
          {
            "name": "titulo",
            "selector": "",
            "attribute": "data-title"
          },
          {
            "name": "titulo_url",
            "selector": "",
            "attribute": "data-url"
          },
          {
            "name": "imagen",
            "selector": "",
            "attribute": "data-image"
          },
          {
            "name": "precio",
            "selector": "",
            "attribute": "data-price"
          },
          {
            "name": "estado",
            "selector": "",
            "attribute": "data-estado"
          },
          {
            "name": "estado1",
            "selector": "",
            "attribute": "data-estado1"
          },
          {
            "name": "estado2",
            "selector": "",
            "attribute": "data-estado2"
          },
          {
            "name": "estado3",
            "selector": "",
            "attribute": "data-estado3"
          }
        ]
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 4440,
      "position_y": 220,
      "config": {
        "selector": "#uscraper-tecnocasa-next"
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 4440,
      "position_y": 560,
      "config": {}
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 4800,
      "position_y": 560,
      "config": {
        "selector": "#uscraper-tecnocasa-next",
        "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": 5160,
      "position_y": 560,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-5",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 5520,
      "position_y": 560,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "scroll-4",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 5880,
      "position_y": 560,
      "config": {
        "direction": "down",
        "amount": 1600
      }
    },
    {
      "block_id": "sleep-6",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 6240,
      "position_y": 560,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "scroll-5",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 6600,
      "position_y": 560,
      "config": {
        "direction": "down",
        "amount": 1600
      }
    },
    {
      "block_id": "sleep-7",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 6960,
      "position_y": 560,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "scroll-6",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 7320,
      "position_y": 560,
      "config": {
        "direction": "up",
        "amount": 4000
      }
    },
    {
      "block_id": "sleep-8",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 7680,
      "position_y": 560,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "inject-javascript-2",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 8040,
      "position_y": 560,
      "config": {
        "waitForCompletion": true,
        "timeout": 15,
        "jsCode": "(function(){const C='uscraper-tecnocasa-results';document.getElementById(C)?.remove();document.querySelectorAll('#uscraper-tecnocasa-next').forEach(e=>e.removeAttribute('id'));const abs=u=>{try{return new URL(u||'',location.href).href}catch(e){return u||''}};const clean=s=>(s||'').replace(/\\s+/g,' ').trim();const text=e=>clean((e&&(e.innerText||e.textContent))||'');const pick=(r,s)=>{try{return text(r.querySelector(s))}catch(e){return''}};const priceRe=/\\d[\\d.]*\\s*€/;const d1=/(\\d+\\s*(?:dorm\\.?|hab\\.?|habitaci[oó]n(?:es)?))/i;const d2=/(\\d+(?:[.,]\\d+)?\\s*m(?:2|²))/i;const d3=/(\\d+\\s*bañ(?:o|os)?)/i;function splitTitle(raw){raw=clean(raw);let m=raw.match(/^(.+?\\b(?:en venta|en alquiler))\\s+(.+)$/i);if(m)return{title:clean(m[1]),estado:clean(m[2])};return{title:raw,estado:''}}function chooseCard(a){let best=a;for(let p=a;p&&p!==document.body;p=p.parentElement){const t=text(p);let score=0;if(priceRe.test(t))score+=2;if(p.querySelector('img,source,picture'))score+=1;if(t.length>20&&t.length<2500)score+=1;if(t.length>2500)score-=2;if(score>=3){best=p;break}}return best}function realFromVal(v){v=clean(v);if(!v||/^data:image\\//i.test(v))return'';if(v.includes(','))v=v.split(',')[0].trim().split(/\\s+/)[0];else v=v.split(/\\s+/)[0];return abs(v)}function imgUrl(card){const imgs=Array.from(card.querySelectorAll('img,source'));const attrs=['data-src','data-lazy','data-original','data-srcset','data-lazy-src','data-full','srcset','src'];for(const el of imgs){for(const at of attrs){const u=realFromVal(el.getAttribute(at));if(u&&/cdn-media\\.medialabtc\\.it|gallery_media|\\.(?:jpe?g|png|webp)(?:\\?|$)/i.test(u))return u}}const html=card.outerHTML||'';let m=html.match(/https?:\\/\\/cdn-media\\.medialabtc\\.it[^\"'\\s<>]+(?:jpe?g|png|webp)/i)||html.match(/\\/es\\/agencies\\/[^\"'\\s<>]+(?:jpe?g|png|webp)/i);if(m)return abs(m[0].replace(/&amp;/g,'&'));for(const el of imgs){const fallback=realFromVal(el.getAttribute('src'));if(fallback)return fallback}return''}function linesOf(el){return((el.innerText||el.textContent||'').split(/\\n+/).map(clean).filter(Boolean))}const links=Array.from(document.querySelectorAll('a[href]')).filter(a=>{try{return /\\/venta\\/.+\\/\\d+\\.html$/.test(new URL(abs(a.getAttribute('href'))).pathname)}catch(e){return false}});const seen=new Set(),rows=[];for(const a of links){const url=abs(a.getAttribute('href')).split('#')[0];if(seen.has(url))continue;seen.add(url);const card=chooseCard(a),all=text(card),lines=linesOf(card);let raw=pick(card,'h1,h2,h3,h4,[class*=\"title\"],[class*=\"titulo\"],[class*=\"typology\"],[class*=\"type\"]')||text(a)||lines.find(l=>/(en venta|en alquiler)/i.test(l))||'';let sp=splitTitle(raw);let title=sp.title,estado=pick(card,'[class*=\"location\"],[class*=\"address\"],[class*=\"zone\"],[class*=\"city\"],[class*=\"municipio\"],[class*=\"localidad\"]')||sp.estado;if(!estado||priceRe.test(estado)||d1.test(estado)||d2.test(estado)||d3.test(estado)||estado===title){estado=sp.estado||lines.find(l=>/,/.test(l)&&!priceRe.test(l)&&!d1.test(l)&&!d2.test(l)&&!d3.test(l)&&l!==title)||''}if(!estado&&sp.estado)estado=sp.estado;const price=(all.match(priceRe)||[''])[0];rows.push({title:title||'',url:url,image:imgUrl(card),price:price||'',estado:estado||'',estado1:(all.match(d1)||[''])[0],estado2:(all.match(d2)||[''])[0],estado3:(all.match(d3)||[''])[0]})}const box=document.createElement('div');box.id=C;box.style.cssText='position:absolute;left:-10000px;top:0;width:10px;min-height:10px;overflow:hidden;z-index:-1;';for(const r of rows){const d=document.createElement('div');d.className='uscraper-tecnocasa-row';d.textContent='.';d.setAttribute('data-title',r.title);d.setAttribute('data-url',r.url);d.setAttribute('data-image',r.image);d.setAttribute('data-price',r.price);d.setAttribute('data-estado',r.estado);d.setAttribute('data-estado1',r.estado1);d.setAttribute('data-estado2',r.estado2);d.setAttribute('data-estado3',r.estado3);box.appendChild(d)}document.body.appendChild(box);const disabled=el=>el.disabled||el.getAttribute('aria-disabled')==='true'||/disabled|inactive|not-allowed/i.test(el.className||'');let cand=Array.from(document.querySelectorAll('a[href],button'));let next=cand.find(el=>{if(disabled(el))return false;const s=((el.getAttribute('rel')||'')+' '+(el.getAttribute('aria-label')||'')+' '+(el.getAttribute('title')||'')+' '+text(el)+' '+(el.className||'')).toLowerCase();return /(^|\\s)next(\\s|$)|siguiente|página siguiente|pagina siguiente|›|»/.test(s)});if(!next){const active=document.querySelector('[aria-current=\"page\"],.active,.current');const sib=active&&active.parentElement&&active.parentElement.nextElementSibling;next=sib&&Array.from(sib.querySelectorAll('a[href],button')).find(el=>!disabled(el))}if(next)next.id='uscraper-tecnocasa-next';return{rows:rows.length,next:!!next};})();"
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 8400,
      "position_y": 560,
      "config": {
        "selector": ".uscraper-tecnocasa-row",
        "timeout": 20,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-2",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 8760,
      "position_y": 560,
      "config": {
        "rowSelector": ".uscraper-tecnocasa-row",
        "fileName": "tecnocasa_scraper_url.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "titulo",
            "selector": "",
            "attribute": "data-title"
          },
          {
            "name": "titulo_url",
            "selector": "",
            "attribute": "data-url"
          },
          {
            "name": "imagen",
            "selector": "",
            "attribute": "data-image"
          },
          {
            "name": "precio",
            "selector": "",
            "attribute": "data-price"
          },
          {
            "name": "estado",
            "selector": "",
            "attribute": "data-estado"
          },
          {
            "name": "estado1",
            "selector": "",
            "attribute": "data-estado1"
          },
          {
            "name": "estado2",
            "selector": "",
            "attribute": "data-estado2"
          },
          {
            "name": "estado3",
            "selector": "",
            "attribute": "data-estado3"
          }
        ]
      }
    }
  ],
  "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": "scroll-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-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": "scroll-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-2",
      "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": "scroll-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-3",
      "from_connector_id": "right",
      "to_block_id": "sleep-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-4",
      "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": "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-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "end-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": "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-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-5",
      "from_connector_id": "right",
      "to_block_id": "scroll-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-4",
      "from_connector_id": "right",
      "to_block_id": "sleep-6",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-6",
      "from_connector_id": "right",
      "to_block_id": "scroll-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-5",
      "from_connector_id": "right",
      "to_block_id": "sleep-7",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-7",
      "from_connector_id": "right",
      "to_block_id": "scroll-6",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-6",
      "from_connector_id": "right",
      "to_block_id": "sleep-8",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-8",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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": "structured-export-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-2",
      "from_connector_id": "right",
      "to_block_id": "element-exists-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": 8600,
      "height": 636,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2",
          "sleep-3",
          "sleep-4",
          "wait-for-element-1",
          "wait-for-page-load-2",
          "sleep-5",
          "sleep-6",
          "sleep-7",
          "sleep-8",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1128,
      "position_y": 116,
      "width": 7160,
      "height": 636,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "scroll-1",
          "scroll-2",
          "scroll-3",
          "inject-javascript-1",
          "scroll-4",
          "scroll-5",
          "scroll-6",
          "inject-javascript-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 4008,
      "position_y": 116,
      "width": 5000,
      "height": 636,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1",
          "structured-export-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 4368,
      "position_y": 116,
      "width": 680,
      "height": 636,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 4368,
      "position_y": 456,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Extracts TecnoCasa real-estate listing data from https://www.tecnocasa.es/venta/inmuebles/comunidad-valenciana/valencia.html. Fields match the Octoparse preview: titulo, titulo_url, imagen, precio, estado, estado1, estado2, estado3. The workflow scrolls through the listing page first to trigger lazy-loaded images, normalizes TecnoCasa property cards into hidden rows, exports the first page with create mode, then follows a detected next-page control and appends subsequent pages if pagination is available. CAPTCHA or bot protection may require manual solving.",
      "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: `(function(){const C='uscraper-tecnocasa-results';document.getElementById(C)?.remove();document.query...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 3560,
      "position_y": 200,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `#uscraper-tecnocasa-next`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 4640,
      "position_y": 200,
      "width": 340,
      "height": 138,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "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": 5000,
      "position_y": 540,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-1"
      }
    },
    {
      "id": "note-block-structured-export-2",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Extracts rows matching `.uscraper-tecnocasa-row`. Confirm row count > 0 before running at scale.",
      "color": "#ee5396",
      "position_x": 8960,
      "position_y": 540,
      "width": 340,
      "height": 112,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-2"
      }
    }
  ]
}