{
  "version": "1.0.0",
  "exported_at": "2026-06-02T20:10:00.000Z",
  "project": {
    "name": "Naver News Scraper",
    "description": "Extracts Naver News-style data from the provided Naver publisher pages and article URL: keyword/context, publisher, publisher URL, publication time, title, article URL, news content/snippet, and extraction time. Uses a multi-URL navigation loop over the analyzed target URLs and appends results to naver-news-scraper.csv. Publisher pages use verified .press_edit_news_item selectors; the OhmyNews detail page uses verified article.newswrap / .at_contents selectors. If Naver presents CAPTCHA or anti-bot verification, pause and solve it manually in the browser.",
    "color": "bg-[#03c75a]",
    "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://media.naver.com/press/047",
          "https://www.ohmynews.com/NWS_Web/View/at_pg.aspx?CNTN_CD=A0003182194&CMPT_CD=P0010&utm_source=naver&utm_medium=newsearch&utm_campaign=naver_news",
          "https://media.naver.com/press/021"
        ],
        "color": "bg-[#03c75a]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 456,
      "position_y": 220,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "selector": ".press_edit_news_item"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "selector": ".press_edit_news_item",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "rowSelector": ".press_edit_news_item",
        "fileName": "naver-news-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "search_keyword",
            "selector": "(() => { const press = document.querySelector('meta[property=\"og:title\"]')?.content?.replace(/\\s*언론사홈\\s*$/, '').trim() || document.querySelector('h3')?.textContent?.trim() || ''; return press ? 'publisher_home:' + press : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publicator",
            "selector": "(() => document.querySelector('meta[property=\"og:title\"]')?.content?.replace(/\\s*언론사홈\\s*$/, '').trim() || document.querySelector('h3')?.textContent?.trim() || '')()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publicator_link_url",
            "selector": "window.location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publication_time",
            "selector": ".r_modify b",
            "attribute": "text"
          },
          {
            "name": "title",
            "selector": ".press_edit_news_title",
            "attribute": "text"
          },
          {
            "name": "title_link_url",
            "selector": ".press_edit_news_link",
            "attribute": "href"
          },
          {
            "name": "news_content",
            "selector": "ROW.querySelector('.press_edit_news_text')?.textContent?.replace(/\\s+/g, ' ').trim() || ROW.textContent?.replace(/\\s+/g, ' ').trim() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "extraction_time",
            "selector": "new Date().toISOString()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1128,
      "position_y": 520,
      "config": {
        "selector": "article.newswrap",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-2",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1632,
      "position_y": 800,
      "config": {
        "rowSelector": "article.newswrap",
        "fileName": "naver-news-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "search_keyword",
            "selector": "document.querySelector('meta[name=\"news_keywords\"]')?.content || new URLSearchParams(window.location.search).get('query') || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publicator",
            "selector": "document.querySelector('meta[property=\"og:site_name\"]')?.content || '오마이뉴스'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publicator_link_url",
            "selector": "document.querySelector('meta[property=\"og:site_name\"]')?.content ? 'https://www.ohmynews.com/' : window.location.origin",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "publication_time",
            "selector": "document.querySelector('meta[property=\"article:published_time\"]')?.content || document.querySelector('.atc_intro_header .date')?.textContent?.trim() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "title",
            "selector": "h1.article_tit",
            "attribute": "text"
          },
          {
            "name": "title_link_url",
            "selector": "window.location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "news_content",
            "selector": ".at_contents",
            "attribute": "text"
          },
          {
            "name": "extraction_time",
            "selector": "new Date().toISOString()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2136,
      "position_y": 520,
      "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": "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"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "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-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-2",
      "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": 1664,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1056,
      "position_y": 116,
      "width": 1328,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1560,
      "position_y": 416,
      "width": 488,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1",
          "structured-export-2"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Extracts Naver News-style data from the provided Naver publisher pages and article URL: keyword/context, publisher, publisher URL, publication time, title, article URL, news content/snippet, and extraction time. Uses a multi-URL navigation loop over the analyzed target URLs and appends results to naver-news-scraper.csv. Publisher pages use verified .press_edit_news_item selectors; the OhmyNews detail page uses verified article.newswrap / .at_contents selectors. If Naver presents CAPTCHA or anti-bot verification, pause and solve it manually in the browser.",
      "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 `.press_edit_news_item`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1328,
      "position_y": 200,
      "width": 340,
      "height": 137,
      "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 (search_keyword, publicator, publicator_link_url, news_content, extraction_time). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 500,
      "width": 340,
      "height": 140,
      "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 (search_keyword, publicator, publicator_link_url, publication_time, title_link_url). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1832,
      "position_y": 780,
      "width": 340,
      "height": 141,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-2"
      }
    },
    {
      "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": 2336,
      "position_y": 500,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}