{
  "version": "1.0.0",
  "exported_at": "2026-06-01T00:00:00.000Z",
  "project": {
    "name": "Gelbe Seiten Scraper by URLs with circles",
    "description": "Scrapes Gelbe Seiten business detail pages by a list of /gsbiz/ URLs. Navigation strategy: known URL list using navigate.urls[] plus loop-continue, appending one lead row per detail URL to gelbe-seiten-scraper-nach-urls.csv. Extracts title, rating, review count, industry, address, postal code, city/location, opening status, email, telephone, fax, website, opening hours, company description, and lead URL. Edit the Navigate block's urls array to add up to the desired Gelbe Seiten listing/detail URLs. If run from a non-German cloud environment, Gelbe Seiten may require German proxy/IP access; missing optional fields are exported blank.",
    "color": "bg-[#ffdc00]",
    "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.gelbeseiten.de/gsbiz/3f165793-39db-4af0-a06b-de2f133db623",
          "https://www.gelbeseiten.de/gsbiz/4c5232be-479d-44bf-bbbe-95a9313e9a49",
          "https://www.gelbeseiten.de/gsbiz/3f19418d-ce6a-4fca-9373-2cea7ec78df5"
        ],
        "color": "bg-[#ffdc00]"
      }
    },
    {
      "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,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 840,
      "position_y": 240,
      "config": {
        "selector": "h1.mod-TeilnehmerKopf__name",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1200,
      "position_y": 240,
      "config": {
        "rowSelector": "body",
        "fileName": "gelbe-seiten-scraper-nach-urls.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "titel",
            "selector": "(()=>{const el=ROW.querySelector('h1.mod-TeilnehmerKopf__name');return el?el.textContent.trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "bewertung",
            "selector": "(()=>{const el=ROW.querySelector('.mod-TeilnehmerKopf__bewertungen .mod-Stars__text')||ROW.querySelector('.mod-TeilnehmerKopf__bewertungen .mod-Stars');const txt=(el&&(el.textContent||el.getAttribute('title'))||'').trim();const m=txt.match(/[0-9]+[,.][0-9]+|[0-9]+/);return m?m[0].replace(',', '.'):''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "anzahl_der_bewertungen",
            "selector": "(()=>{const el=ROW.querySelector('.mod-TeilnehmerKopf__bewertungen');const txt=el?el.textContent.replace(/\\s+/g,' ').trim():'';const m=txt.match(/([0-9]+)\\s+Bewertung/);return m?m[1]:''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "branche",
            "selector": "(()=>{const el=ROW.querySelector('[data-selenium=\"teilnehmerkopf__branche\"]');return el?el.textContent.replace(/\\s+/g,' ').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "adresse",
            "selector": "(()=>{const el=ROW.querySelector('.mod-TeilnehmerKopf__adresse .mod-TeilnehmerKopf__adresse-daten');return el?el.textContent.replace(/\\s+/g,' ').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "plz",
            "selector": "(()=>{const els=ROW.querySelectorAll('.mod-TeilnehmerKopf__adresse .mod-TeilnehmerKopf__adresse-daten');return els[1]?els[1].textContent.replace(/\\s+/g,' ').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "standort",
            "selector": "(()=>{const el=ROW.querySelector('.mod-TeilnehmerKopf__adresse .mod-TeilnehmerKopf__adresse-daten--noborder');return el?el.textContent.replace(/\\s+/g,' ').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "oeffnungsstatus",
            "selector": "(()=>{const el=ROW.querySelector('.mod-TeilnehmerKopf__oeffnungszeiten');return el?el.textContent.replace(/\\s+/g,' ').replace(/\\s*–\\s*/g,'–').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "e_mail",
            "selector": "(()=>{const el=ROW.querySelector('#email_versenden[data-link^=\"mailto:\"]');const v=el?el.getAttribute('data-link')||'':'';return v?decodeURIComponent(v.replace(/^mailto:/,'').split('?')[0]):''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "telefon",
            "selector": "(()=>{const el=ROW.querySelector('#kontaktdaten [data-role=\"telefonnummer\"]')||ROW.querySelector('[data-role=\"telefonnummer\"]');const suffix=el?el.getAttribute('data-suffix'):'';if(suffix)return suffix.trim();const a=ROW.querySelector('#kontaktdaten a[href^=\"tel:\"]')||ROW.querySelector('a[href^=\"tel:\"]');return a?a.textContent.replace(/\\s+/g,' ').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "fax",
            "selector": "(()=>{const el=ROW.querySelector('#kontaktdaten .contains-icon-big-fax')||ROW.querySelector('.contains-icon-big-fax');return el?el.textContent.replace(/\\s+/g,' ').trim():''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "(()=>{const bad=['gelbeseiten.de','golocal.de','11880.com','kennstdueinen.de','docinsider.de','google.com/maps'];const links=Array.from(ROW.querySelectorAll('a[href^=\"http\"]')).map(a=>a.href);return links.find(h=>!bad.some(b=>h.includes(b)))||''})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "oeffnungszeiten",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('#oeffnungszeiten .mod-Oeffnungszeiten__container > div'));return rows.map(r=>{const day=(r.querySelector('.mod-Oeffnungszeiten__tag')?.textContent||'').replace(/\\s+/g,' ').trim();const times=Array.from(r.querySelectorAll('.mod-Oeffnungszeiten__zeit')).map(t=>t.textContent.replace(/\\s+/g,' ').trim()).filter(Boolean).join(' / ');const fallback=r.textContent.replace(/\\s+/g,' ').trim();return day?(day+': '+(times||fallback.replace(day,''))).trim():fallback;}).filter(Boolean).join(' | ')})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ueber_das_unternehmen",
            "selector": "(()=>{const norm=s=>(s||'').replace(/\\s+/g,' ').trim();const h=Array.from(ROW.querySelectorAll('h2')).find(x=>/Über das Unternehmen/i.test(x.textContent||''));if(!h)return '';const mod=h.closest('.mod')||h.parentElement;const ps=Array.from(mod.querySelectorAll('p')).map(p=>norm(p.textContent)).filter(Boolean);if(ps.length)return ps.join('\\n');return norm((mod.textContent||'').replace(h.textContent||'', ''));})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "lead_url",
            "selector": "(()=>window.location.href)()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 1560,
      "position_y": 240,
      "config": {
        "color": "bg-[#ff832b]"
      }
    }
  ],
  "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": "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": "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": 1040,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1128,
      "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": 1488,
      "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 Gelbe Seiten business detail pages by a list of /gsbiz/ URLs. Navigation strategy: known URL list using navigate.urls[] plus loop-continue, appending one lead row per detail URL to gelbe-seiten-scraper-nach-urls.csv. Extracts title, rating, review count, industry, address, postal code, city/location, opening status, email, telephone, fax, website, opening hours, company description, and lead URL. Edit the Navigate block's urls array to add up to the desired Gelbe Seiten listing/detail URLs. If run from a non-German cloud environment, Gelbe Seiten may require German proxy/IP access; missing optional fields are exported blank.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (titel, bewertung, anzahl_der_bewertungen, branche, adresse). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 220,
      "width": 340,
      "height": 133,
      "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": 1760,
      "position_y": 220,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}