{
  "version": "1.0.0",
  "exported_at": "2026-05-31T07:45:00.000Z",
  "project": {
    "name": "YouTube Video List Scraper",
    "description": "Scrapes YouTube search video listings for the keyword Octoparse. Extracts video title, video URL, channel name, channel URL, view count, publish date, and description. YouTube search uses infinite scrolling rather than numbered pagination; this corrected version performs a bounded 10-scroll loading pass, then exports all loaded ytd-video-renderer rows to youtube-video-list-scraper.csv. Increase or duplicate the scroll/sleep blocks for deeper result collection. YouTube may show CAPTCHA or sign-in/bot verification depending on IP, traffic, or browser profile.",
    "color": "bg-[#ff0000]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 120,
      "position_y": 200,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 480,
      "position_y": 200,
      "config": {
        "url": "https://www.youtube.com/results?search_query=Octoparse",
        "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": 840,
      "position_y": 200,
      "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": 1200,
      "position_y": 200,
      "config": {
        "selector": "ytd-video-renderer",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "scroll-1",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 1560,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-2",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 2280,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2640,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-3",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 3000,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3360,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-4",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 3720,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-4",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 4080,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-5",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 4440,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-5",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 4800,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-6",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 5160,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-6",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 5520,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-7",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 5880,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-7",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 6240,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-8",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 6600,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-8",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 6960,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-9",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 7320,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-9",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 7680,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "scroll-10",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 8040,
      "position_y": 200,
      "config": {
        "direction": "down",
        "amount": 2400,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-10",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 8400,
      "position_y": 200,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 8760,
      "position_y": 200,
      "config": {
        "selector": "ytd-video-renderer",
        "timeout": 15,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 9120,
      "position_y": 200,
      "config": {
        "rowSelector": "ytd-video-renderer",
        "fileName": "youtube-video-list-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "create",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "video_title",
            "selector": "(ROW.querySelector('a#video-title')?.getAttribute('title') || ROW.querySelector('a#video-title')?.textContent || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "video_link",
            "selector": "(() => { const a = ROW.querySelector('a#video-title'); return a ? new URL(a.getAttribute('href'), location.origin).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "channel_name",
            "selector": "(ROW.querySelector('ytd-channel-name a')?.textContent || ROW.querySelector('#channel-info a')?.textContent || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "channel_link",
            "selector": "(() => { const a = ROW.querySelector('ytd-channel-name a') || ROW.querySelector('#channel-info a'); return a ? new URL(a.getAttribute('href'), location.origin).href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "total_views",
            "selector": "Array.from(ROW.querySelectorAll('#metadata-line span')).map(s => s.textContent.trim()).find(t => /views?/i.test(t)) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publish_date",
            "selector": "Array.from(ROW.querySelectorAll('#metadata-line span')).map(s => s.textContent.trim()).find(t => /(ago|streamed|premiered|scheduled|live|hour|day|week|month|year)/i.test(t) && !/views?/i.test(t)) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "description",
            "selector": "(ROW.querySelector('#description-text')?.textContent || ROW.querySelector('yt-formatted-string#description-text')?.textContent || '').trim()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 9480,
      "position_y": 200,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "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": "scroll-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-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": "scroll-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-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": "scroll-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-3",
      "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": "scroll-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-4",
      "from_connector_id": "right",
      "to_block_id": "sleep-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-4",
      "from_connector_id": "right",
      "to_block_id": "scroll-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-5",
      "from_connector_id": "right",
      "to_block_id": "sleep-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-5",
      "from_connector_id": "right",
      "to_block_id": "scroll-6",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-6",
      "from_connector_id": "right",
      "to_block_id": "sleep-6",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-6",
      "from_connector_id": "right",
      "to_block_id": "scroll-7",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-7",
      "from_connector_id": "right",
      "to_block_id": "sleep-7",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-7",
      "from_connector_id": "right",
      "to_block_id": "scroll-8",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-8",
      "from_connector_id": "right",
      "to_block_id": "sleep-8",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-8",
      "from_connector_id": "right",
      "to_block_id": "scroll-9",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-9",
      "from_connector_id": "right",
      "to_block_id": "sleep-9",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-9",
      "from_connector_id": "right",
      "to_block_id": "scroll-10",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-10",
      "from_connector_id": "right",
      "to_block_id": "sleep-10",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-10",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-2",
      "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": "end-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 96,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 408,
      "position_y": 96,
      "width": 8600,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1",
          "sleep-2",
          "sleep-3",
          "sleep-4",
          "sleep-5",
          "sleep-6",
          "sleep-7",
          "sleep-8",
          "sleep-9",
          "sleep-10",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 96,
      "width": 6800,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "scroll-1",
          "scroll-2",
          "scroll-3",
          "scroll-4",
          "scroll-5",
          "scroll-6",
          "scroll-7",
          "scroll-8",
          "scroll-9",
          "scroll-10"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 9048,
      "position_y": 96,
      "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": 9408,
      "position_y": 96,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes YouTube search video listings for the keyword Octoparse. Extracts video title, video URL, channel name, channel URL, view count, publish date, and description. YouTube search uses infinite scrolling rather than numbered pagination; this corrected version performs a bounded 10-scroll loading pass, then exports all loaded ytd-video-renderer rows to youtube-video-list-scraper.csv. Increase or duplicate the scroll/sleep blocks for deeper result collection. YouTube may show CAPTCHA or sign-in/bot verification depending on IP, traffic, or browser profile.",
      "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 (video_title, video_link, channel_name, channel_link, total_views). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 9320,
      "position_y": 180,
      "width": 340,
      "height": 135,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    }
  ]
}