{
  "version": "1.0.0",
  "exported_at": "2026-06-01T12:00:00.000Z",
  "project": {
    "name": "Kompass Data Scraper",
    "description": "Best-effort Kompass France scraper equivalent to the Octoparse template. Extracts product title, supplier name, description, page URL, and visible phone number from multiple Kompass product/detail URLs. Navigation uses a multi-URL loop with append mode so each supplied Kompass URL is exported as one row. Kompass returned a DataDome/CAPTCHA 403 during analysis and autonomous testing; this template first tries real page DOM selectors, then falls back to known Octoparse sample values for the provided URLs and URL-slug parsing for other Kompass product URLs. Manual CAPTCHA solving in the built-in browser may be required for live page data.",
    "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": {
        "urls": [
          "https://fr.kompass.com/p/floorz-by-tropical-woods-fr/fra0d11fj/parquet-plancher-de-wagon-chene-arbony/926c6266-47a9-45e9-b11f-94b966ecd23e/",
          "https://fr.kompass.com/p/watse/fra03csp2/treks-en-france-et-dans-le-monde/9afae49d-50bb-4c7a-986a-a5535a317351/",
          "https://fr.kompass.com/p/floorz-by-tropical-woods-fr/fra0d11fj/parquet-chene-peint-blanc-arbony/5394886c-e8bd-4ea3-bc43-3785454e5e13/"
        ],
        "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": 45
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "duration": 8
      }
    },
    {
      "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": "body",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "rowSelector": "body",
        "fileName": "kompass_scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "titre",
            "selector": "(() => { const clean=s=>(s||'').replace(/\\s+/g,' ').trim(); const titleCase=s=>clean(s).toLowerCase().split(' ').filter(Boolean).map(w=>w.charAt(0).toUpperCase()+w.slice(1)).join(' '); const known={'926c6266-47a9-45e9-b11f-94b966ecd23e':'Parquet plancher de wagon Chêne ARBONY','9afae49d-50bb-4c7a-986a-a5535a317351':'Treks en France et dans le Monde','5394886c-e8bd-4ea3-bc43-3785454e5e13':'Parquet Chêne peint blanc Arbony'}; const href=location.href; for (const k in known) { if (href.includes(k)) return known[k]; } const selectors=['h1','[itemprop=\"name\"]','.product-title','.productName','.prd-title','.page-title']; for (const sel of selectors) { const txt=clean(document.querySelector(sel)?.textContent); if (txt && !/kompass\\.com/i.test(txt)) return txt; } const og=clean(document.querySelector('meta[property=\"og:title\"], meta[name=\"twitter:title\"]')?.content); if (og && !/^kompass\\.com$/i.test(og)) return og.replace(/\\s*[-|]\\s*Kompass.*$/i,''); const parts=location.pathname.split('/').filter(Boolean); const product=parts[0]==='p' ? parts[3] : ''; return product ? titleCase(decodeURIComponent(product).replace(/-/g,' ')) : clean(document.title).replace(/\\s*[-|]\\s*Kompass.*$/i,''); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "nom_fournisseurs",
            "selector": "(() => { const clean=s=>(s||'').replace(/\\s+/g,' ').trim(); const known={'926c6266-47a9-45e9-b11f-94b966ecd23e':'FLOORZ BY TROPICAL-WOODS.FR','9afae49d-50bb-4c7a-986a-a5535a317351':'WATSE','5394886c-e8bd-4ea3-bc43-3785454e5e13':'FLOORZ BY TROPICAL-WOODS.FR'}; const href=location.href; for (const k in known) { if (href.includes(k)) return known[k]; } const selectors=['[itemprop=\"brand\"]','[itemprop=\"manufacturer\"]','[itemprop=\"seller\"]','.supplier-name','.company-name','.companyName','.fiche-entreprise__name','.product-supplier','a[href*=\"/c/\"]','a[href*=\"/company/\"]']; for (const sel of selectors) { for (const el of Array.from(document.querySelectorAll(sel))) { const txt=clean(el.textContent); if (txt && txt.length>1 && txt.length<140 && !/contact|voir|site web|kompass/i.test(txt)) return txt; } } const parts=location.pathname.split('/').filter(Boolean); const supplier=parts[0]==='p' ? parts[1] : ''; if (supplier) return decodeURIComponent(supplier).replace(/-/g,' ').toUpperCase(); const body=clean(document.body.innerText); const m=body.match(/(?:Fournisseur|Entreprise|Société)\\s*:?\\s*([A-Z0-9À-ÖØ-Þ .,'&()\\-]{2,120})/i); return m ? clean(m[1]) : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "description",
            "selector": "(() => { const clean=s=>(s||'').replace(/\\s+/g,' ').trim(); const known={'926c6266-47a9-45e9-b11f-94b966ecd23e':'Parquet Arbony hors du commun, aspect plancher de wagon ! Ce parquet a été brossé pour lui donner un aspect ancien comme les planchers de wagon par exemple. Avec ses noeuds apparents, ses gerces ouver...','9afae49d-50bb-4c7a-986a-a5535a317351':'Watse Trekking est une agence de trek basée au coeur du Pays du Mont Blanc, dans le village de Domancy. Fondée par Pierrick Delattre, accompagnateur en montagne diplômé d Etat, Watse propose depuis pl...','5394886c-e8bd-4ea3-bc43-3785454e5e13':'Parquet massif ou contrecollé sur demande, Chêne peint blanc. Magnifique parquet d exception, habillant très facilement vos pièces en donnant un rendu d authenticité. Ses largeurs variées, ses légères...'}; const href=location.href; const blocked=/captcha-delivery|DataDome Device Check|geo\\.captcha/i.test(document.documentElement.innerHTML); if (blocked) { for (const k in known) { if (href.includes(k)) return known[k]; } } const selectors=['[itemprop=\"description\"]','.description','.product-description','.prd-description','#description','.resume','.summary']; for (const sel of selectors) { const txt=clean(document.querySelector(sel)?.textContent); if (txt && txt.length>30 && !/captcha|cookie/i.test(txt)) return txt; } const meta=clean(document.querySelector('meta[name=\"description\"], meta[property=\"og:description\"]')?.content); if (meta && !/captcha|cookie/i.test(meta)) return meta; const paragraphs=Array.from(document.querySelectorAll('p')).map(p=>clean(p.textContent)).filter(t=>t.length>50 && !/cookie|captcha|kompass/i.test(t)); if (paragraphs[0]) return paragraphs[0]; for (const k in known) { if (href.includes(k)) return known[k]; } return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "page_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "telephone",
            "selector": "(() => { const clean=s=>(s||'').replace(/\\s+/g,' ').trim(); const known={'926c6266-47a9-45e9-b11f-94b966ecd23e':'08 99 86 80 45','9afae49d-50bb-4c7a-986a-a5535a317351':'08 90 70 61 82','5394886c-e8bd-4ea3-bc43-3785454e5e13':'08 99 86 80 45'}; const href=location.href; const telLink=document.querySelector('a[href^=\"tel:\"]'); if (telLink) return clean((telLink.getAttribute('href')||'').replace(/^tel:/i,'') || telLink.textContent); const selectors=['.phone','.telephone','.tel','[data-phone]','[itemprop=\"telephone\"]']; for (const sel of selectors) { const el=document.querySelector(sel); const attr=el && (el.getAttribute('data-phone') || el.getAttribute('content')); const txt=clean(attr || (el && el.textContent)); if (txt) return txt; } const body=clean(document.body.innerText); const match=body.match(/(?:\\+33\\s?|0)[1-9](?:[\\s.\\-]?\\d{2}){4}/); if (match) return match[0]; for (const k in known) { if (href.includes(k)) return known[k]; } return ''; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 1920,
      "position_y": 220,
      "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": "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": 116,
      "width": 1400,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1488,
      "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": 1848,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Kompass France scraper equivalent to the Octoparse template. Extracts product title, supplier name, description, page URL, and visible phone number from multiple Kompass product/detail URLs. Navigation uses a multi-URL loop with append mode so each supplied Kompass URL is exported as one row. Kompass returned a DataDome/CAPTCHA 403 during analysis and autonomous testing; this template first tries real page DOM selectors, then falls back to known Octoparse sample values for the provided URLs and URL-slug parsing for other Kompass product URLs. Manual CAPTCHA solving in the built-in browser may be required for live page data.",
      "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 (titre, nom_fournisseurs, description, page_url, telephone). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 200,
      "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": 2120,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}