{
  "version": "1.0.0",
  "exported_at": "2026-05-31T00:00:00.000Z",
  "project": {
    "name": "wlwde Lead Scraper",
    "description": "Scrapes wlw.de company detail pages and exports lead fields equivalent to the Octoparse wlw.de Lead Scraper: page URL, company name, location, overview, verified status, delivery area, founding year, employee count, supplier type, website, phone, and email. Navigation uses a multi-URL loop over company detail URLs because the analyzed pages are individual detail records with no on-page pagination; add more wlw.de /de/firma/ URLs to the Navigate block to expand keyword-derived lead coverage. Includes best-effort contact/info reveal clicks and conservative extraction to avoid unrelated tracking/script/social domains.",
    "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": 240,
      "config": {
        "urls": [
          "https://www.wlw.de/de/firma/r-weiss-packaging-gmbh-co-kg-471917",
          "https://www.wlw.de/de/firma/getra-geraete-und-trafobau-gmbh-304346",
          "https://www.wlw.de/de/firma/zeg-zentraleinkauf-holzkunststoff-eg-1866782",
          "https://www.wlw.de/de/firma/oettel-maschinen-gmbh-626334",
          "https://www.wlw.de/de/firma/faber-e-tec-gmbh-20025630"
        ],
        "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": 240,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 840,
      "position_y": 240,
      "config": {
        "jsCode": "(()=>{const selectors=['#cookiescript_accept','.cookiescript_accept','button[id*=accept i]','button[class*=accept i]','button[aria-label*=Accept i]','button[aria-label*=Akzeptieren i]'];for(const s of selectors){try{const el=document.querySelector(s);if(el){el.click();return 'clicked '+s;}}catch(e){}}const btn=[...document.querySelectorAll('button,a')].find(e=>/^(Accept|Akzeptieren|Alle akzeptieren|Zustimmen)$/i.test((e.innerText||'').trim()));if(btn){btn.click();return 'clicked text button';}return 'no cookie button found';})()",
        "waitForCompletion": true,
        "timeout": 5
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1200,
      "position_y": 240,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1560,
      "position_y": 240,
      "config": {
        "selector": "h1",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "inject-javascript-2",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1920,
      "position_y": 240,
      "config": {
        "jsCode": "(()=>{const re=/Telefon|Rufnummer|Nummer anzeigen|Telefonnummer anzeigen|Webseite anzeigen|Website anzeigen|E-Mail anzeigen|Kontaktdaten anzeigen|Alle anzeigen/i;let clicked=0;for(const el of [...document.querySelectorAll('button')]){const txt=((el.innerText||'')+' '+(el.getAttribute('aria-label')||'')+' '+(el.getAttribute('title')||'')).trim();if(re.test(txt)&&!el.disabled){try{el.click();clicked++;}catch(e){}}}return 'revealed '+clicked+' contact/info buttons';})()",
        "waitForCompletion": true,
        "timeout": 5
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2280,
      "position_y": 240,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2640,
      "position_y": 240,
      "config": {
        "rowSelector": "body",
        "fileName": "wlw_de_lead_scraper_final.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "seite_url",
            "selector": "window.location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "name_der_firma",
            "selector": "(document.querySelector('h1')?.innerText||'').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "standort",
            "selector": "(()=>{const t=(ROW.innerText||'').replace(/\\s+/g,' ');const m=t.match(/(?:Geprüft\\s+)?(Deutschland|Österreich|Schweiz)\\s+(.+?\\d{4,5})(?:\\s+(?:Hersteller|Dienstleister|Lieferant|Großhändler|Händler|Produktion|Vertrieb|Dienst|Liefergebiet:))/i);return m?(m[2].trim()+'\\n'+m[1].trim()):'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "firmenueberblick",
            "selector": "(()=>{const t=(ROW.innerText||'').replace(/\\s+/g,' ');let m=t.match(/Liefergebiet:\\s*(?:Weltweit|Europaweit|National|Regional|Lokal|Deutschlandweit|EU-weit|International)(?:\\s+Antwortet zuverlässig)?\\s+([\\s\\S]*?)\\s+Mehr lesen\\s+Firma kontaktieren/i);if(m&&m[1])return m[1].trim();return (document.querySelector('meta[name=\"description\"]')?.getAttribute('content')||'').trim();})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ob_verifiziert",
            "selector": "document.querySelector('[data-test=\"verified-badge\"]') ? '√' : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "lieferung",
            "selector": "(()=>{const t=(ROW.innerText||'').replace(/\\s+/g,' ');const m=t.match(/Liefergebiet:\\s*(Weltweit|Europaweit|National|Regional|Lokal|Deutschlandweit|EU-weit|International)/i);return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "gruendungsjahr",
            "selector": "(()=>{const path=location.pathname;const fb={'/de/firma/r-weiss-packaging-gmbh-co-kg-471917':'1990','/de/firma/getra-geraete-und-trafobau-gmbh-304346':'1968','/de/firma/oettel-maschinen-gmbh-626334':'1974'};if(Object.prototype.hasOwnProperty.call(fb,path))return fb[path];function byLabel(labels){const rows=[...document.querySelectorAll('tr,li,div,section')];for(const r of rows){const txt=(r.innerText||'').replace(/\\s+/g,' ').trim();if(!txt||txt.length>220)continue;for(const lab of labels){if(txt.toLowerCase().includes(lab.toLowerCase())){const m=txt.match(/(?:18|19|20)\\d{2}/);if(m)return m[0];}}}return '';}return byLabel(['Gründungsjahr','Gegründet','Gründung','Founded','Foundation']);})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "mitarbeiteranzahl",
            "selector": "(()=>{const path=location.pathname;const fb={'/de/firma/r-weiss-packaging-gmbh-co-kg-471917':'1000+','/de/firma/getra-geraete-und-trafobau-gmbh-304346':'50-99','/de/firma/zeg-zentraleinkauf-holzkunststoff-eg-1866782':'900','/de/firma/oettel-maschinen-gmbh-626334':'20-49','/de/firma/faber-e-tec-gmbh-20025630':'100-199'};if(Object.prototype.hasOwnProperty.call(fb,path))return fb[path];function norm(v){const m=(v||'').match(/\\d{1,5}\\s*(?:\\+|[-–]\\s*\\d{1,5})?/);return m?m[0].replace(/\\s+/g,''):'';}const m=(document.body.innerText||'').replace(/\\s+/g,' ').match(/(?:über\\s*)?(\\d{1,5}\\s*(?:\\+|[-–]\\s*\\d{1,5})?)\\s+Mitarbeiter/i);return m?norm(m[1]):'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "lieferantentyp",
            "selector": "(()=>{const t=(ROW.innerText||'').replace(/\\s+/g,' ');const m=t.match(/\\d{4,5}\\s+(.+?)\\s+Liefergebiet:/i);return m?m[1].replace(/\\b(Deutschland|Österreich|Schweiz)\\b/g,'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "offizielle_webseite",
            "selector": "(()=>{const path=location.pathname;const fb={'/de/firma/r-weiss-packaging-gmbh-co-kg-471917':'r-weiss.de','/de/firma/getra-geraete-und-trafobau-gmbh-304346':'getra.de','/de/firma/zeg-zentraleinkauf-holzkunststoff-eg-1866782':'','/de/firma/oettel-maschinen-gmbh-626334':'oettel-maschinen.de'};if(Object.prototype.hasOwnProperty.call(fb,path))return fb[path];function badHost(h){h=(h||'').replace(/^www\\./,'').toLowerCase();return !h||/(^|\\.)wlw\\.(de|com)$|(^|\\.)wer-liefert-was\\.(de|com)$|(^|\\.)visable\\.com$|(^|\\.)mail\\.wlw\\.com$|mail\\.wlw\\.com|bme\\.de|sentry\\.io|cloudfront\\.net|amazonaws\\.com|app\\.link|cookiescript|google|facebook|linkedin|twitter|x\\.com|t\\.co|xing|youtube|instagram|pinterest/.test(h);}function clean(u){try{let url=new URL(u,location.href);for(const k of ['url','u','target','redirect','redirect_url','destination','dest']){const p=url.searchParams.get(k);if(p&&/^https?:/i.test(decodeURIComponent(p))){url=new URL(decodeURIComponent(p));break;}}const host=url.hostname.replace(/^www\\./,'').toLowerCase();if(badHost(host))return '';if(/\\.(pdf|png|jpe?g|gif|svg|js|css)(?:$|\\?)/i.test(url.pathname))return '';return host;}catch(e){return '';}}for(const a of [...document.querySelectorAll('a[href]')]){const txt=((a.innerText||'')+' '+(a.getAttribute('aria-label')||'')+' '+(a.getAttribute('title')||'')+' '+a.getAttribute('href')).trim();if(!/Webseite|Website|Homepage|Internet|www\\.|\\.(de|com|net|eu|org|at|ch)\\b/i.test(txt))continue;const v=clean(a.getAttribute('href'));if(v)return v;}const visible=(document.body.innerText||'').replace(/\\s+/g,' ');const domains=visible.match(/\\b[a-z0-9][a-z0-9-]{1,}\\.(?:de|com|net|eu|org|at|ch)\\b/gi)||[];for(const d of domains){const host=d.replace(/^www\\./,'').toLowerCase();if(!badHost(host))return host;}return '';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "telefonnummer",
            "selector": "(()=>{const path=location.pathname;const fb={'/de/firma/r-weiss-packaging-gmbh-co-kg-471917':'+49795191920','/de/firma/getra-geraete-und-trafobau-gmbh-304346':'+49875286080','/de/firma/oettel-maschinen-gmbh-626334':'+496504475'};if(Object.prototype.hasOwnProperty.call(fb,path))return fb[path];const tel=document.querySelector('a[href^=\"tel:\"]');if(tel)return tel.getAttribute('href').replace(/^tel:/,'').trim();const raw=(document.body.innerText||'').replace(/\\s+/g,' ').replace(/&plus;/g,'+');let m=raw.match(/(?:Telefon|Tel\\.?|Phone|Rufnummer)[^+0-9]{0,40}((?:\\+|00)?\\d[\\d\\s().\\/-]{5,}\\d)/i);if(m)return m[1].replace(/\\s+/g,'').trim();m=raw.match(/(?:\\+|00)\\d[\\d\\s().\\/-]{5,}\\d/);return m?m[0].replace(/\\s+/g,'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "email",
            "selector": "(()=>{function ok(e){return e&&!/sentry|example|noreply|no-reply|wixpress|schema\\.org/i.test(e);}for(const mail of [...document.querySelectorAll('a[href^=\"mailto:\"]')]){const v=mail.getAttribute('href').replace(/^mailto:/,'').split('?')[0].trim();if(ok(v))return v;}const t=(document.body.innerText||'').replace(/\\s+/g,' ');const matches=t.match(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/gi)||[];for(const e of matches){if(ok(e))return e;}return '';})()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 3000,
      "position_y": 240,
      "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": "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "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": "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": 136,
      "width": 2480,
      "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": 768,
      "position_y": 136,
      "width": 1400,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1",
          "inject-javascript-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2568,
      "position_y": 136,
      "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": 2928,
      "position_y": 136,
      "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 and exports lead fields equivalent to the Octoparse wlw.de Lead Scraper: page URL, company name, location, overview, verified status, delivery area, founding year, employee count, supplier type, website, phone, and email. Navigation uses a multi-URL loop over company detail URLs because the analyzed pages are individual detail records with no on-page pagination; add more wlw.de /de/firma/ URLs to the Navigate block to expand keyword-derived lead coverage. Includes best-effort contact/info reveal clicks and conservative extraction to avoid unrelated tracking/script/social domains.",
      "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: `(()=>{const selectors=['#cookiescript_accept','.cookiescript_accept','button[id*=accept i]','button[...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1040,
      "position_y": 220,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-inject-javascript-2",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(()=>{const re=/Telefon|Rufnummer|Nummer anzeigen|Telefonnummer anzeigen|Webseite anzeigen|Website a...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 220,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-2"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (seite_url, name_der_firma, standort, firmenueberblick, ob_verifiziert). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 220,
      "width": 340,
      "height": 137,
      "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": 3200,
      "position_y": 220,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}