{
  "version": "1.0.0",
  "exported_at": "2026-06-02T00:00:00.000Z",
  "project": {
    "name": "Malt freelance Info Scraper",
    "description": "Best-effort Malt.fr freelancer listing scraper equivalent to the Octoparse template. Extracts profile URL, name, skill headline, missions, rating/reviews, recommendations, location, daily rate, experience, response rate, and response time from Malt tag listing pages such as /s/tags/... ?p=1. Pagination is handled by clicking a detected Next/Suivant control and appending rows until no next control exists. Attached analysis and test run showed Malt Cloudflare/security verification; this template now branches safely when no freelancer profile links are visible and writes a diagnostic row instead of failing.",
    "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": {
        "url": "https://www.malt.fr/s/tags/recrutement-59ca86916e6c295df40aa487?p=1",
        "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": 45
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 240,
      "config": {
        "duration": 10
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1200,
      "position_y": 240,
      "config": {
        "selector": "a[href*=\"/profile/\"][href*=\"seo=true\"], a[href*=\"/profile/\"][href*=\"q=\"]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1560,
      "position_y": 240,
      "config": {
        "rowSelector": "a[href*=\"/profile/\"][href*=\"seo=true\"], a[href*=\"/profile/\"][href*=\"q=\"]",
        "fileName": "malt-freelance-Info-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "URL_original",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "URL_profil",
            "selector": "(() => { const href = ROW.getAttribute('href') || ''; return href ? new URL(href, location.href).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Nom",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const candidate = card.querySelector('[data-testid*=\"name\"], h1, h2, h3') || ROW; const lines = (candidate.innerText || candidate.textContent || '').split(/\\n+/).map(s => s.trim()).filter(Boolean); return lines[0] || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Compétence",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const lines = text.split(/\\n+/).map(s => s.trim()).filter(Boolean); const name = lines[0] || ''; return lines.find(l => l !== name && !/€|ans|avis|recommand|mission|%|réponse|reponse|\\d+\\s*h|Cloudflare|cookies/i.test(l) && l.length > 2) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Missions",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const m = text.match(/(\\d+\\s+missions?)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Note",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const m = text.match(/(?:note|rating)?\\s*(\\d[\\.,]\\d|\\d)\\s*\\/\\s*5/i) || text.match(/★\\s*(\\d[\\.,]?\\d?)/); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Nombre_d_avis",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const m = text.match(/(\\d+\\s+avis)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Recommendation",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const m = text.match(/(\\d+\\s+recommandations?)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Localisation",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const lines = text.split(/\\n+/).map(s => s.trim()).filter(Boolean); return lines.find(l => /(France|Paris|Lyon|Marseille|Bordeaux|Lille|Toulouse|Nantes|Metz|Guérande|Rennes|Belgique|Suisse|Luxembourg)/i.test(l) && !/€|ans|avis|mission|%/.test(l)) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Tarif_indicatif",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const m = text.match(/(\\d+[\\s\\u00a0]*€\\s*\\/?\\s*(?:jour|j))/i); return m ? m[1].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Expérience",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const m = text.match(/(\\d+\\s*-\\s*\\d+\\s*ans|\\d+\\+?\\s*ans)/i); return m ? m[1].replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Taux_de_réponse",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const matches = Array.from(text.matchAll(/(\\d{1,3}\\s*%)/g)).map(m => m[1].replace(/\\s+/g, ' ').trim()); return matches.find(v => parseInt(v, 10) <= 100) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Temps_de_réponse",
            "selector": "(() => { const card = ROW.closest('[data-testid*=\"freelancer\"], [data-testid*=\"profile\"], article, li, [class*=\"card\"], [class*=\"Card\"]') || ROW; const text = card.innerText || card.textContent || ''; const lines = text.split(/\\n+/).map(s => s.trim()).filter(Boolean); const idx = lines.findIndex(l => /\\d{1,3}\\s*%/.test(l)); if (idx >= 0) { const after = lines.slice(idx + 1).find(l => /(\\d+\\s*h|quelques\\s+jours|quelques\\s+heures|\\d+\\s*jours?|\\d+\\s*minutes?)/i.test(l)); if (after) return after; } const m = text.match(/(\\d+\\s*h|quelques\\s+jours|quelques\\s+heures|\\d+\\s*jours?|\\d+\\s*minutes?)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "structured-export-2",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1200,
      "position_y": 560,
      "config": {
        "rowSelector": "body",
        "fileName": "malt-freelance-Info-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "URL_original",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "URL_profil",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Nom",
            "selector": "'BLOCKED_BY_SECURITY_VERIFICATION'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Compétence",
            "selector": "(() => { return document.querySelector('h2')?.innerText?.trim() || document.title || 'Security verification page'; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Missions",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Note",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Nombre_d_avis",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Recommendation",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Localisation",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Tarif_indicatif",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Expérience",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Taux_de_réponse",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Temps_de_réponse",
            "selector": "(() => { const text = document.body?.innerText || ''; return /security verification|Cloudflare|not a bot|Enable JavaScript/i.test(text) ? 'Malt blocked automated access with security verification' : 'No freelancer profile links found'; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "element-exists-2",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1920,
      "position_y": 240,
      "config": {
        "selector": "a[rel=\"next\"]:not(.disabled):not([aria-disabled=\"true\"]), a[aria-label*=\"Suivant\"]:not(.disabled):not([aria-disabled=\"true\"]), a[aria-label*=\"Next\"]:not(.disabled):not([aria-disabled=\"true\"]), button[aria-label*=\"Suivant\"]:not([disabled]):not([aria-disabled=\"true\"]), button[aria-label*=\"Next\"]:not([disabled]):not([aria-disabled=\"true\"])"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 1920,
      "position_y": 560,
      "config": {
        "selector": "a[rel=\"next\"]:not(.disabled):not([aria-disabled=\"true\"]), a[aria-label*=\"Suivant\"]:not(.disabled):not([aria-disabled=\"true\"]), a[aria-label*=\"Next\"]:not(.disabled):not([aria-disabled=\"true\"]), button[aria-label*=\"Suivant\"]:not([disabled]):not([aria-disabled=\"true\"]), button[aria-label*=\"Next\"]:not([disabled]):not([aria-disabled=\"true\"])",
        "timeout": 15
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 2280,
      "position_y": 560,
      "config": {
        "timeout": 45
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2640,
      "position_y": 560,
      "config": {
        "duration": 4
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 1920,
      "position_y": 920,
      "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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "structured-export-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-2",
      "from_connector_id": "right",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "element-exists-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-2",
      "from_connector_id": "false",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-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-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "element-exists-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": 2840,
      "height": 616,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-page-load-2",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1128,
      "position_y": 136,
      "width": 1040,
      "height": 616,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "element-exists-2",
          "click-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1128,
      "position_y": 136,
      "width": 680,
      "height": 616,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1",
          "structured-export-2"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 1848,
      "position_y": 816,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Malt.fr freelancer listing scraper equivalent to the Octoparse template. Extracts profile URL, name, skill headline, missions, rating/reviews, recommendations, location, daily rate, experience, response rate, and response time from Malt tag listing pages such as /s/tags/... ?p=1. Pagination is handled by clicking a detected Next/Suivant control and appending rows until no next control exists. Attached analysis and test run showed Malt Cloudflare/security verification; this template now branches safely when no freelancer profile links are visible and writes a diagnostic row instead of failing.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `a[href*=\"/profile/\"][href*=\"seo=true\"], a[href*=\"/profile/\"][href*=\"q=\"]`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 220,
      "width": 340,
      "height": 154,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (URL_original, URL_profil, Nom, Compétence, Missions). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 220,
      "width": 340,
      "height": 131,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-structured-export-2",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (URL_original, URL_profil, Nom, Compétence, Missions). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 540,
      "width": 340,
      "height": 131,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-2"
      }
    },
    {
      "id": "note-block-element-exists-2",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `a[rel=\"next\"]:not(.disabled):not([aria-disabled=\"true\"]), a[aria-label*=\"Suivant\"]:not(.disabled):not([aria-disabled=\"tr`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 220,
      "width": 340,
      "height": 170,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-2"
      }
    },
    {
      "id": "note-block-click-1",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 540,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-1"
      }
    }
  ]
}