{
  "version": "1.0.0",
  "exported_at": "2026-06-03T00:00:00.000Z",
  "project": {
    "name": "SeasonalJobs Scraper",
    "description": "Extracts SeasonalJobs.dol.gov job detail records matching the Octoparse SeasonalJobs Scraper preview. Uses a multi-URL detail-page loop for the provided SeasonalJobs job URLs and appends all records into seasonalJobs-scraper.csv. Add more /jobs/{case-number} URLs to the Navigate block to scrape additional job pages.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated-seasonaljobs-scraper"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to each SeasonalJobs detail URL",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "urls": [
          "https://seasonaljobs.dol.gov/jobs/H-300-24166-113661",
          "https://seasonaljobs.dol.gov/jobs/H-300-24155-065823",
          "https://seasonaljobs.dol.gov/jobs/H-300-24151-051257"
        ],
        "color": "bg-[#4589ff]",
        "tags": [
          "seasonaljobs",
          "multi-url",
          "job-detail"
        ]
      }
    },
    {
      "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": 30
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until the job detail container and JSON-LD are present",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "selector": "#job-detail script[type=\"application/ld+json\"]",
        "timeout": 30,
        "visible": false
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export SeasonalJobs detail fields",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "rowSelector": "#job-detail",
        "fileName": "seasonalJobs-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "Titulo",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); return j.title || ROW.querySelector('section h2')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Empresa",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); return j.hiringOrganization?.name || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Fecha_inicio",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); return (j.jobStartDate || '').replace('.000Z', 'Z'); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Fecha_finalización",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); return (j.validThrough || '').replace('.000Z', 'Z'); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Salario",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); const v = j.baseSalary?.value?.minValue; return v !== undefined && v !== null ? Number(v).toFixed(2).replace(/\\.?0+$/, '') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Teléfono_para_aplicar",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); const fromJson = j.hiringOrganization?.telephone || ''; if (fromJson) return fromJson; const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Telephone Number to Apply')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Correo_para_aplicar",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); const fromJson = j.hiringOrganization?.email || ''; if (fromJson) return fromJson; const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Email address to Apply')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Tiempo_completo",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Full Time')); const v = dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; return /^yes$/i.test(v) ? 'True' : (/^no$/i.test(v) ? 'False' : v); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Número_Solicitados",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Number of Workers Requested')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Deberes",
            "selector": "(() => { const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); if (j.description) return j.description.trim(); const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Job Duties')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Experiencias_Necesarias",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Months of Experience Required')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Requisitos",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Special Requirements')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Hora_Laboral_Semanal",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Number of Hours Per Week')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Horario",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Work Schedule')); return dt?.parentElement?.querySelector('dd')?.textContent.trim() || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Dirección",
            "selector": "(() => { const dt = Array.from(ROW.querySelectorAll('dt')).find(el => el.textContent.trim().startsWith('Worksite Address')); const visible = dt?.parentElement?.querySelector('dd')?.textContent.trim(); if (visible) return visible; const j = JSON.parse(ROW.querySelector('script[type=\"application/ld+json\"]')?.textContent || '{}'); const a = j.jobLocation?.address || {}; return [a.streetAddress, a.addressLocality, a.addressRegion, a.postalCode].filter(Boolean).join(', '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "URL",
            "selector": "(() => location.href.split('#')[0])()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Short polite delay between job pages",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue to the next SeasonalJobs detail URL",
      "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": "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": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-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": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1128,
      "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": "Extracts SeasonalJobs.dol.gov job detail records matching the Octoparse SeasonalJobs Scraper preview. Uses a multi-URL detail-page loop for the provided SeasonalJobs job URLs and appends all records into seasonalJobs-scraper.csv. Add more /jobs/{case-number} URLs to the Navigate block to scrape additional job pages.",
      "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 (Titulo, Empresa, Fecha_inicio, Fecha_finalización, Salario). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1400,
      "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"
      }
    }
  ]
}