{
  "version": "1.0.0",
  "exported_at": "2026-06-02T00:00:00.000Z",
  "project": {
    "name": "Kununucom Leads Scraper",
    "description": "Scrapes public Kununu company profile URLs and exports the same lead-style fields described by the Octoparse template: company name, active/claimed indicator, location, industry/country text, customer rating, review count, company URL, and progress/source marker. Navigation uses a multi-URL loop with the provided Kununu company URLs; add or replace entries in navigate.urls to scrape additional employer/profile URLs. Kununu may show a CAPTCHA/human-check page. This template detects 'confirm you are human', gives a finite manual-solve window, refreshes/rechecks once, and ends safely if still blocked so it does not intentionally export CAPTCHA text. Note: because multi-URL scraping uses append mode, clear any previous output CSV before rerunning if you want a fresh file.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to each Kununu company profile URL",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.kununu.com/de/deutsche-post",
          "https://www.kununu.com/de/deutschebahn",
          "https://www.kununu.com/de/lidl-deutschland"
        ],
        "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": 40
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Allow dynamic Kununu content or anti-bot page to render",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until the page body is available",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "selector": "body",
        "timeout": 40,
        "visible": true
      }
    },
    {
      "block_id": "text-contains-1",
      "block_type": "process",
      "title": "Text Contains",
      "description": "Check whether Kununu is showing a human/CAPTCHA challenge",
      "position_x": 1464,
      "position_y": 220,
      "config": {
        "selector": "body",
        "text": "confirm you are human",
        "timeout": 5,
        "caseSensitive": false
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Finite manual-solve window for Kununu human challenge",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "duration": 45
      }
    },
    {
      "block_id": "refresh-1",
      "block_type": "process",
      "title": "Refresh",
      "description": "Refresh after the manual CAPTCHA solve window",
      "position_x": 2136,
      "position_y": 520,
      "config": {}
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for refreshed page to finish loading",
      "position_x": 2472,
      "position_y": 520,
      "config": {
        "timeout": 40
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Allow refreshed page content to render",
      "position_x": 2808,
      "position_y": 520,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "text-contains-2",
      "block_type": "process",
      "title": "Text Contains",
      "description": "Re-check whether the human/CAPTCHA challenge is still present",
      "position_x": 3144,
      "position_y": 758,
      "config": {
        "selector": "body",
        "text": "confirm you are human",
        "timeout": 5,
        "caseSensitive": false
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export Kununu employer lead fields from the company profile page",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "rowSelector": "body",
        "fileName": "kununucom-leads-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "unternehmen_name",
            "selector": "(() => { const txt = document.body.textContent.replace(/\\s+/g,' ').trim(); if (/confirm you are human|captcha|human check/i.test(txt)) return ''; const h1 = document.querySelector('h1'); let name = h1 && h1.textContent.trim() ? h1.textContent.replace(/\\s+/g,' ').trim() : ''; if (!name) { const og = document.querySelector('meta[property=\"og:title\"], meta[name=\"twitter:title\"]'); name = og ? (og.getAttribute('content') || '') : document.title; } return name.replace(/\\s*als\\s+Arbeitgeber.*$/i,'').replace(/\\s*[-|].*$/,'').trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ob_aktiv",
            "selector": "(() => { const text = document.body.textContent.replace(/\\s+/g,' ').trim(); if (/confirm you are human|captcha|human check/i.test(text)) return ''; return /(arbeitgeber\\s*aktiv|profil\\s*beansprucht|claimed|aktiv)/i.test(text) ? '√' : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "standort",
            "selector": "(() => { const text = document.body.textContent.replace(/\\s+/g,' ').trim(); if (/confirm you are human|captcha|human check/i.test(text)) return ''; const scripts = Array.from(document.querySelectorAll('script[type=\"application/ld+json\"], script#__NEXT_DATA__, script')).map(s => s.textContent || '').join(' '); const jsonLoc = scripts.match(/\"addressLocality\"\\s*:\\s*\"([^\"]{2,80})\"/i) || scripts.match(/\"city\"\\s*:\\s*\"([^\"]{2,80})\"/i) || scripts.match(/\"location\"\\s*:\\s*\"([^\"]{2,80})\"/i); if (jsonLoc) return jsonLoc[1].replace(/\\\\u002F/g,'/').trim(); const linkTexts = Array.from(document.querySelectorAll('a[href*=\"location\"], a[href*=\"standort\"], [data-testid*=\"location\"], [data-testid*=\"standort\"]')).map(el => el.textContent.replace(/\\s+/g,' ').trim()).filter(t => t && t.length >= 2 && t.length <= 80 && !/stellen|jobs|benefit|weiter|bewertung|bewertungen|inland|ausland/i.test(t)); if (linkTexts.length) return linkTexts[0]; const m = text.match(/(?:Hauptsitz|Sitz|Standort)\\s*:?\\s*([A-ZÄÖÜ][A-Za-zÄÖÜäöüß\\- ]{1,40})(?:\\s|,|\\.)/); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "branche",
            "selector": "(() => { const text = document.body.textContent.replace(/\\s+/g,' ').trim(); if (/confirm you are human|captcha|human check/i.test(text)) return ''; const scripts = Array.from(document.querySelectorAll('script[type=\"application/ld+json\"], script#__NEXT_DATA__, script')).map(s => s.textContent || '').join(' '); const jsonIndustry = scripts.match(/\"industry\"\\s*:\\s*\"([^\"]{2,100})\"/i) || scripts.match(/\"branche\"\\s*:\\s*\"([^\"]{2,100})\"/i); if (jsonIndustry) return jsonIndustry[1].replace(/\\\\u002F/g,'/').trim(); const scorePattern = text.match(/([A-ZÄÖÜ][A-Za-zÄÖÜäöüß/&\\- ]{2,80})\\s*\\([1-5][,.]\\d\\s*Punkte\\)\\.Alle\\s+[\\d\\.]+\\s+Bewertungen/i); if (scorePattern) return scorePattern[1].trim(); const label = text.match(/(?:Branche|Industrie|Industry)\\s*:?\\s*([A-ZÄÖÜ][A-Za-zÄÖÜäöüß/&\\- ]{2,80})/i); if (label) return label[1].replace(/\\s*(Bewertungen|Benefits|Jobs).*$/i,'').trim(); const candidates = Array.from(document.querySelectorAll('a[href*=\"industry\"], a[href*=\"branche\"], [data-testid*=\"industry\"], [data-testid*=\"branche\"]')).map(el => el.textContent.replace(/\\s+/g,' ').trim()).filter(t => t && t.length <= 80 && !/bewertung|bewertungen|benefits|jobs/i.test(t)); return candidates[0] || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "kundenbewertung",
            "selector": "(() => { const bodyText = document.body.textContent.replace(/\\s+/g,' ').trim(); if (/confirm you are human|captcha|human check/i.test(bodyText)) return ''; const aria = Array.from(document.querySelectorAll('[aria-label]')).map(el => el.getAttribute('aria-label') || '').find(t => /(Bewertung|Sterne|rating|score)/i.test(t) && /\\d+[,.]\\d/.test(t)); if (aria) { const m = aria.match(/(\\d+[,.]\\d)/); if (m) return m[1].replace('.', ','); } const nearRating = bodyText.match(/(?:Score|Bewertung|Gesamtbewertung|kununu Score)?\\s*([1-5][,.]\\d)\\s*(?:\\/\\s*5|von\\s*5)?/i); return nearRating ? nearRating[1].replace('.', ',') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "anzahl_der_bewertungen",
            "selector": "(() => { const text = document.body.textContent.replace(/\\s+/g,' ').trim(); if (/confirm you are human|captcha|human check/i.test(text)) return ''; const m = text.match(/([\\d\\.]+)\\s*(Bewertungen|Bewertung|Reviews|Review)/i); return m ? `${m[1]} ${m[2]}` : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "unternehmen_url",
            "selector": "(() => location.href.split('?')[0].replace(/\\/$/, ''))()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "progress",
            "selector": "(() => `profile_url: ${location.href.split('?')[0].replace(/\\/$/, '')}`)()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input URL loop",
      "position_x": 1968,
      "position_y": 800,
      "config": {}
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution if Kununu remains blocked by human check",
      "position_x": 3480,
      "position_y": 520,
      "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "from_connector_id": "right",
      "to_block_id": "text-contains-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "text-contains-1",
      "from_connector_id": "false",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "text-contains-1",
      "from_connector_id": "true",
      "to_block_id": "sleep-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": "sleep-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-3",
      "from_connector_id": "right",
      "to_block_id": "text-contains-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "text-contains-2",
      "from_connector_id": "false",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "text-contains-2",
      "from_connector_id": "true",
      "to_block_id": "end-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": 116,
      "width": 3008,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "sleep-2",
          "refresh-1",
          "wait-for-page-load-2",
          "sleep-3"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1392,
      "position_y": 116,
      "width": 2000,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "text-contains-1",
          "text-contains-2",
          "loop-continue-1"
        ]
      }
    },
    {
      "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": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 3408,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes public Kununu company profile URLs and exports the same lead-style fields described by the Octoparse template: company name, active/claimed indicator, location, industry/country text, customer rating, review count, company URL, and progress/source marker. Navigation uses a multi-URL loop with the provided Kununu company URLs; add or replace entries in navigate.urls to scrape additional employer/profile URLs. Kununu may show a CAPTCHA/human-check page. This template detects 'confirm you are human', gives a finite manual-solve window, refreshes/rechecks once, and ends safely if still blocked so it does not intentionally export CAPTCHA text. Note: because multi-URL scraping uses append mode, clear any previous output CSV before rerunning if you want a fresh file.",
      "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 3 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 320,
      "position_y": 200,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-text-contains-1",
      "element_type": "note",
      "title": "Note: Text Contains",
      "content": "Condition block: checks `body`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1664,
      "position_y": 200,
      "width": 340,
      "height": 131,
      "z_index": 22,
      "data": {
        "block_id": "text-contains-1"
      }
    },
    {
      "id": "note-block-text-contains-2",
      "element_type": "note",
      "title": "Note: Text Contains",
      "content": "Condition block: checks `body`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 3344,
      "position_y": 738,
      "width": 340,
      "height": 131,
      "z_index": 22,
      "data": {
        "block_id": "text-contains-2"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (unternehmen_name, ob_aktiv, standort, branche, kundenbewertung). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1664,
      "position_y": 500,
      "width": 340,
      "height": 134,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-loop-continue-1",
      "element_type": "note",
      "title": "Note: Loop Continue",
      "content": "Loop Continue advances a multi-URL or multi-text loop. Place at the end of the loop body with a clear back-edge to the loop start.",
      "color": "#ee5396",
      "position_x": 2168,
      "position_y": 780,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}