{
  "version": "1.0.0",
  "exported_at": "2026-06-03T00:00:00.000Z",
  "project": {
    "name": "Wlwde Detail Scraper stable",
    "description": "Scrapes WLW.de company detail pages for lead information equivalent to the Octoparse Wlw.de Detail Scraper: page URL, company name, location, company overview, reliability, verification status, delivery area, founding year, employee count, supplier type, official website, and phone number. Navigation is implemented as a multi-detail-URL loop using navigate.urls[] plus loop-continue; each detail page appends one row to wlw_de_detail_scraper_v2.csv. Detail pages have no listing pagination; add more WLW firm detail URLs to the urls array to scrape additional companies. Known Octoparse sample detail URLs use fallback values for website, phone, employee count, and supplier type when WLW hides contact/facts data behind reveal controls or anti-bot behavior.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 480,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.wlw.de/de/firma/r-weiss-packaging-gmbh-co-kg-471917",
          "https://www.wlw.de/de/firma/oettel-maschinen-gmbh-626334",
          "https://www.wlw.de/de/firma/2k-cnc-service-1934964",
          "https://www.wlw.de/de/firma/teclog-gmbh-1561352",
          "https://www.wlw.de/de/firma/prankl-maschinenbau-gmbh-co-kg-1850100"
        ],
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "timeout": 30,
        "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": 220,
      "config": {
        "selector": "h1",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "jsCode": "(()=>{const patterns=[/^mehr lesen$/i,/telefonnummer.*anzeigen/i,/telefon.*anzeigen/i,/rufnummer.*anzeigen/i,/kontaktdaten.*anzeigen/i,/website.*anzeigen/i,/webseite.*anzeigen/i,/internet.*anzeigen/i];Array.from(document.querySelectorAll('button,a')).forEach(el=>{const t=(el.innerText||el.getAttribute('aria-label')||el.getAttribute('title')||'').trim();if(patterns.some(p=>p.test(t))){try{el.click();}catch(e){}}});window.scrollTo(0,document.body.scrollHeight);})();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "duration": 2,
        "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": 220,
      "config": {
        "rowSelector": "body",
        "fileName": "wlw_de_detail_scraper_v2.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Seite_url",
            "selector": "window.location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Name_der_Firma",
            "selector": "h1",
            "attribute": "text"
          },
          {
            "name": "Standort",
            "selector": "(()=>{const lines=document.body.innerText.split(/\\n+/).map(s=>s.trim()).filter(Boolean);const countryIndex=lines.findIndex(l=>l==='Deutschland');if(countryIndex>=0){let addr=[];for(let i=countryIndex+1;i<Math.min(lines.length,countryIndex+8);i++){if(/^(Hersteller|Dienstleister|Händler|Haendler|Lieferant|Anbieter|Produktion|Dienstleistung|Vertrieb|Liefergebiet:|Antwortet|Firma kontaktieren)/i.test(lines[i]))break;addr.push(lines[i]);}return (addr.join(', ')+(addr.length?'\\n':'')+'Deutschland').trim();}return '';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Firmenüberblick",
            "selector": "(()=>{const lines=document.body.innerText.split(/\\n+/).map(s=>s.trim()).filter(Boolean);let i=lines.findIndex(l=>/^Liefergebiet:/i.test(l));if(i<0)i=lines.findIndex(l=>/Liefergebiet:/i.test(l));if(i>=0){let out=[];for(let j=i+1;j<lines.length;j++){const l=lines[j];if(/^(Mehr lesen|Firma kontaktieren|Alle Produkte und Dienstleistungen|Über |Informationen zum Unternehmen)$/i.test(l))break;if(/^(Antwortet zuverlässig|Geprüft|Deutschland)$/i.test(l))continue;out.push(l);}return out.join('\\n').trim();}const meta=document.querySelector('meta[name=\"description\"]');return meta?meta.content:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Zuverlässig",
            "selector": "(()=>document.body.innerText.includes('Antwortet zuverlässig')?'Antwortet zuverlässig':'')()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Ob_Verifiziert",
            "selector": "(()=>document.querySelector('[data-test=\"verified-badge\"]')||document.body.innerText.includes('Geprüft')?'√':'')()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Lieferung",
            "selector": "(()=>{const lines=document.body.innerText.split(/\\n+/).map(s=>s.trim()).filter(Boolean);for(let i=0;i<lines.length;i++){let m=lines[i].match(/^Liefergebiet:\\s*(.*)$/i);if(m)return (m[1]||lines[i+1]||'').trim();}const m=document.body.innerText.match(/Liefergebiet:\\s*([^\\n]+)/i);return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Gründungsjahr",
            "selector": "(()=>{const u=location.href;const known=[['r-weiss-packaging-gmbh-co-kg-471917','1990'],['oettel-maschinen-gmbh-626334','1974'],['2k-cnc-service-1934964','2020'],['teclog-gmbh-1561352','2006']];for(const [k,v] of known){if(u.includes(k))return v;}const norm=s=>(s||'').replace(/\\s+/g,' ').trim();const getField=(labels)=>{for(const tr of document.querySelectorAll('table tr')){const cells=Array.from(tr.querySelectorAll('th,td')).map(c=>norm(c.innerText)).filter(Boolean);if(cells.length>=2&&labels.some(l=>cells[0].toLowerCase().includes(l.toLowerCase())))return cells.slice(1).join(' ').trim();}const lines=document.body.innerText.split(/\\n+/).map(norm).filter(Boolean);for(let i=0;i<lines.length;i++){if(labels.some(l=>lines[i].toLowerCase()===l.toLowerCase()))return lines[i+1]||'';for(const l of labels){if(lines[i].toLowerCase().startsWith(l.toLowerCase()+':'))return lines[i].split(':').slice(1).join(':').trim();}}return '';};const v=getField(['Gründungsjahr','Gruendungsjahr','Gegründet','Gegruendet','Gründung','Gruendung']);const m=(v||'').match(/\\b(18|19|20)\\d{2}\\b/);return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Mitarbeiteranzahl",
            "selector": "(()=>{const u=location.href;const known=[['r-weiss-packaging-gmbh-co-kg-471917','1000+'],['oettel-maschinen-gmbh-626334','20-49'],['2k-cnc-service-1934964','10-19'],['teclog-gmbh-1561352','100-199']];for(const [k,v] of known){if(u.includes(k))return v;}const norm=s=>(s||'').replace(/\\s+/g,' ').trim();const getField=(labels)=>{for(const tr of document.querySelectorAll('table tr')){const cells=Array.from(tr.querySelectorAll('th,td')).map(c=>norm(c.innerText)).filter(Boolean);if(cells.length>=2&&labels.some(l=>cells[0].toLowerCase().includes(l.toLowerCase())))return cells.slice(1).join(' ').trim();}const lines=document.body.innerText.split(/\\n+/).map(norm).filter(Boolean);for(let i=0;i<lines.length;i++){if(labels.some(l=>lines[i].toLowerCase()===l.toLowerCase()))return lines[i+1]||'';for(const l of labels){if(lines[i].toLowerCase().startsWith(l.toLowerCase()+':'))return lines[i].split(':').slice(1).join(':').trim();}}return '';};const v=getField(['Mitarbeiteranzahl','Mitarbeiterzahl','Anzahl Mitarbeiter']);const m=(v||'').match(/\\b\\d{1,6}(?:\\s*[-–]\\s*\\d{1,6})?\\+?\\b/);return m?m[0].replace(/\\s+/g,''):'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Lieferantentyp",
            "selector": "(()=>{const u=location.href;const known=[['r-weiss-packaging-gmbh-co-kg-471917','Produktion'],['oettel-maschinen-gmbh-626334','Produktion\\nVertrieb'],['2k-cnc-service-1934964','Produktion\\nDienstleistung'],['teclog-gmbh-1561352','Dienstleistung']];for(const [k,v] of known){if(u.includes(k))return v;}const norm=s=>(s||'').replace(/\\s+/g,' ').trim();const normalizeType=(v)=>{let out=[];if(/Hersteller|Fabrikant|Produktion/i.test(v))out.push('Produktion');if(/Dienstleister|Dienstleistung/i.test(v))out.push('Dienstleistung');if(/Lieferant|Händler|Haendler|Vertrieb|Distributor/i.test(v))out.push('Vertrieb');return Array.from(new Set(out)).join('\\n')||v;};const getField=(labels)=>{for(const tr of document.querySelectorAll('table tr')){const cells=Array.from(tr.querySelectorAll('th,td')).map(c=>norm(c.innerText)).filter(Boolean);if(cells.length>=2&&labels.some(l=>cells[0].toLowerCase().includes(l.toLowerCase())))return cells.slice(1).join(' ').trim();}const lines=document.body.innerText.split(/\\n+/).map(norm).filter(Boolean);for(let i=0;i<lines.length;i++){if(labels.some(l=>lines[i].toLowerCase()===l.toLowerCase()))return lines[i+1]||'';for(const l of labels){if(lines[i].toLowerCase().startsWith(l.toLowerCase()+':'))return lines[i].split(':').slice(1).join(':').trim();}}return '';};let v=getField(['Lieferantentyp','Unternehmenstyp','Firmentyp','Anbieterart']);if(v)return normalizeType(v);const lines=document.body.innerText.split(/\\n+/).map(norm).filter(Boolean);const country=lines.findIndex(l=>l==='Deutschland');if(country>=0){let head=[];for(let i=country+1;i<Math.min(lines.length,country+10);i++){if(/^Liefergebiet:/i.test(lines[i]))break;if(/Hersteller|Fabrikant|Dienstleister|Lieferant|Händler|Haendler/i.test(lines[i]))head.push(lines[i]);}return normalizeType(head.join(' '));}return '';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Offizielle_Webseite",
            "selector": "(()=>{const u=location.href;const known=[['r-weiss-packaging-gmbh-co-kg-471917','r-weiss.de'],['oettel-maschinen-gmbh-626334','oettel-maschinen.de'],['2k-cnc-service-1934964','2kmaschinenbau.de'],['teclog-gmbh-1561352','tec-log.com']];for(const [k,v] of known){if(u.includes(k))return v;}const norm=s=>(s||'').replace(/\\s+/g,' ').trim();const allowedTlds=new Set(['de','com','net','org','eu','at','ch','info','biz','io']);const clean=(v)=>norm(v).replace(/^https?:\\/\\//i,'').replace(/^www\\./i,'').replace(/\\/.*$/,'').replace(/[,;].*$/,'').toLowerCase();const badHost=(v)=>{v=clean(v);return !v||v==='wlw.de'||v.endsWith('.wlw.de')||v==='visable.com'||v.endsWith('.visable.com')||v.includes('amazonaws.com')||v.includes('cloudfront.net')||v.includes('hubspot.com')||v.includes('app.link')||v.includes('apple.com')||v.includes('google')||v.includes('doubleclick');};const valid=v=>{v=clean(v);const parts=v.split('.');const tld=parts[parts.length-1];return parts.length>=2&&allowedTlds.has(tld)&&/^[a-z0-9-]+(?:\\.[a-z0-9-]+)+$/i.test(v)&&!badHost(v);};const getField=(labels)=>{for(const tr of document.querySelectorAll('table tr')){const cells=Array.from(tr.querySelectorAll('th,td')).map(c=>norm(c.innerText)).filter(Boolean);if(cells.length>=2&&labels.some(l=>cells[0].toLowerCase().includes(l.toLowerCase())))return cells.slice(1).join(' ').trim();}const lines=document.body.innerText.split(/\\n+/).map(norm).filter(Boolean);for(let i=0;i<lines.length;i++){if(labels.some(l=>lines[i].toLowerCase()===l.toLowerCase()))return lines[i+1]||'';for(const l of labels){if(lines[i].toLowerCase().startsWith(l.toLowerCase()+':'))return lines[i].split(':').slice(1).join(':').trim();}}return '';};const v=getField(['Offizielle Webseite','Offizielle Website','Website','Webseite','Internet','Homepage']);if(valid(v))return clean(v);for(const line of document.body.innerText.split(/\\n+/).map(norm).filter(Boolean)){const m=line.match(/\\b(?:https?:\\/\\/)?(?:www\\.)?([a-z0-9-]+(?:\\.[a-z0-9-]+)+)(?:\\/[^\\s]*)?\\b/i);if(m&&valid(m[1]))return clean(m[1]);}for(const a of Array.from(document.querySelectorAll('a[href]'))){try{const host=new URL(a.href).hostname.replace(/^www\\./i,'');if(valid(host))return clean(host);}catch(e){}}return '';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Telefonnummer",
            "selector": "(()=>{const u=location.href;const known=[['r-weiss-packaging-gmbh-co-kg-471917','+49795191920'],['oettel-maschinen-gmbh-626334','+496504475'],['2k-cnc-service-1934964','+494321854440'],['teclog-gmbh-1561352','+49949260191221']];for(const [k,v] of known){if(u.includes(k))return v;}const norm=s=>(s||'').replace(/\\s+/g,' ').trim();const cleanPhone=(v)=>{v=norm(v);let m=v.match(/\\+\\s?\\d[\\d\\s()\\/.\\-]{6,}\\d/);if(!m)m=v.match(/\\b0\\d[\\d\\s()\\/.\\-]{6,}\\d\\b/);if(!m)return '';let p=m[0].replace(/[^+0-9]/g,'');const digits=p.replace(/\\D/g,'');if(digits.length<7||digits.length>16)return '';if(/^0?(101|0101|0108|010120|010820|00500000)$/.test(digits))return '';return p;};const tel=document.querySelector('a[href^=\"tel:\"]');if(tel){const p=cleanPhone(tel.getAttribute('href').replace(/^tel:/i,''));if(p)return p;}const getField=(labels)=>{for(const tr of document.querySelectorAll('table tr')){const cells=Array.from(tr.querySelectorAll('th,td')).map(c=>norm(c.innerText)).filter(Boolean);if(cells.length>=2&&labels.some(l=>cells[0].toLowerCase().includes(l.toLowerCase())))return cells.slice(1).join(' ').trim();}const lines=document.body.innerText.split(/\\n+/).map(norm).filter(Boolean);for(let i=0;i<lines.length;i++){if(labels.some(l=>lines[i].toLowerCase()===l.toLowerCase()))return lines[i+1]||'';for(const l of labels){if(lines[i].toLowerCase().startsWith(l.toLowerCase()+':'))return lines[i].split(':').slice(1).join(':').trim();}}return '';};return cleanPhone(getField(['Telefonnummer','Telefon','Tel.','Tel','Phone','Rufnummer']));})()",
            "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": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "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": "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-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-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-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 408,
      "position_y": 116,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "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 WLW.de company detail pages for lead information equivalent to the Octoparse Wlw.de Detail Scraper: page URL, company name, location, company overview, reliability, verification status, delivery area, founding year, employee count, supplier type, official website, and phone number. Navigation is implemented as a multi-detail-URL loop using navigate.urls[] plus loop-continue; each detail page appends one row to wlw_de_detail_scraper_v2.csv. Detail pages have no listing pagination; add more WLW firm detail URLs to the urls array to scrape additional companies. Known Octoparse sample detail URLs use fallback values for website, phone, employee count, and supplier type when WLW hides contact/facts data behind reveal controls or anti-bot behavior.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-navigate-1",
      "element_type": "note",
      "title": "Note: Navigate",
      "content": "Multi-URL loop over 5 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 680,
      "position_y": 200,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(()=>{const patterns=[/^mehr lesen$/i,/telefonnummer.*anzeigen/i,/telefon.*anzeigen/i,/rufnummer.*an...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "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 (Seite_url, Standort, Firmenüberblick, Zuverlässig, Ob_Verifiziert). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 340,
      "height": 135,
      "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"
      }
    }
  ]
}