{
  "version": "1.0.0",
  "exported_at": "2026-06-03T06:30:00.000Z",
  "project": {
    "name": "Ruliweb Community Scraper",
    "description": "Extracts Ruliweb community/search-result posts from the sample 승리의 여신: 니케 member-search listing, including board name, rating, post ID, category, title, URL, comments, author, author profile/search URL, recommendations, views, date, detail-page content, detail-page images, and extraction time. Pagination is implemented with a known URL list for pages 1-6 and append-mode CSV output. Detail content/images are fetched from each row's same-origin post URL using injected JavaScript and single-line sanitized values. Ruliweb may temporarily time out or rate-limit repeated automated runs; if net::ERR_CONNECTION_TIMED_OUT persists, retry after a cooldown, run in visible browser, or use a proxy/network that can access Ruliweb.",
    "color": "bg-[#42be65]",
    "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": 220,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 480,
      "position_y": 220,
      "config": {
        "duration": 15,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "urls": [
          "https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=1742706",
          "https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=1742706&page=2",
          "https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=1742706&page=3",
          "https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=1742706&page=4",
          "https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=1742706&page=5",
          "https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=1742706&page=6"
        ],
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 1200,
      "position_y": 220,
      "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": 1560,
      "position_y": 220,
      "config": {
        "selector": "tr.table_body.blocktarget",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "jsCode": "window.__ruliwebDetailCache = window.__ruliwebDetailCache || {}; window.__ruliwebCleanText = function(s) { return (s || '').replace(/\\r/g, '').replace(/[ \\t]+/g, ' ').replace(/\\n+/g, ' | ').replace(/\\s*\\|\\s*/g, ' | ').replace(/(\\s*\\|\\s*){2,}/g, ' | ').trim(); }; window.__ruliwebGetDetail = function(row) { const link = row.querySelector('a.subject_link'); const url = link ? link.href : ''; if (!url) return {content:'', images:'', detail_title:'', fetched_url:''}; if (window.__ruliwebDetailCache[url]) return window.__ruliwebDetailCache[url]; const result = {content:'', images:'', detail_title:'', fetched_url:url}; try { const xhr = new XMLHttpRequest(); xhr.open('GET', url, false); xhr.send(null); if (xhr.status >= 200 && xhr.status < 400) { const doc = new DOMParser().parseFromString(xhr.responseText, 'text/html'); const titleMeta = doc.querySelector('meta[property=\"og:title\"], meta[name=\"title\"]'); result.detail_title = titleMeta ? titleMeta.getAttribute('content') : ''; const selectors = ['#view_content', '.view_content', '.article_content', '.read_content', '.board_read_content', '.board_read_body', '.document_content', '.xe_content', '.rd_body', '.view_body', '.fr-view', '#board_read .content', '.board_main_view .content']; let contentEl = null; for (const sel of selectors) { const el = doc.querySelector(sel); if (el && window.__ruliwebCleanText(el.innerText || el.textContent).length > 20) { contentEl = el; break; } } let bodyText = contentEl ? window.__ruliwebCleanText(contentEl.innerText || contentEl.textContent) : ''; if (!bodyText || bodyText.length < 20) { const desc = doc.querySelector('meta[name=\"description\"], meta[property=\"og:description\"]'); bodyText = desc ? window.__ruliwebCleanText(desc.getAttribute('content')) : ''; } if (!bodyText || bodyText.length < 20) { let txt = doc.body ? (doc.body.innerText || '') : ''; const startMarkers = ['프로필 열기/닫기', 'URL 복사 | | | | |', 'IP : (IP보기클릭)', '작성일']; let start = -1; for (const m of startMarkers) { const idx = txt.indexOf(m); if (idx >= 0) start = Math.max(start, idx + m.length); } if (start >= 0) txt = txt.slice(start); const endMarkers = ['댓글 |', '댓글 로그인이 필요합니다', '글쓰기 목록', '신고 | 차단', '목록 | 이전글 | 다음글']; let end = txt.length; for (const m of endMarkers) { const idx = txt.indexOf(m); if (idx >= 0 && idx < end) end = idx; } bodyText = window.__ruliwebCleanText(txt.slice(0, end)); } result.content = bodyText; const imgScope = contentEl || doc; let imgs = Array.from(imgScope.querySelectorAll('img')).map(function(img) { return img.currentSrc || img.src || img.getAttribute('data-src') || img.getAttribute('data-original') || ''; }).filter(function(src) { return src && /(i\\d+\\.ruliweb\\.com\\/img|ruliweb\\.com\\/img|nng-phinf\\.pstatic\\.net)/i.test(src) && !/(ruliweb_bi|icon|banner|view\\/log|adsense|ad_|profile|avatar)/i.test(src); }); if (!imgs.length) { imgs = Array.from(doc.querySelectorAll('img')).map(function(img) { return img.currentSrc || img.src || img.getAttribute('data-src') || img.getAttribute('data-original') || ''; }).filter(function(src) { return src && /(i\\d+\\.ruliweb\\.com\\/img|ruliweb\\.com\\/img|nng-phinf\\.pstatic\\.net)/i.test(src) && !/(ruliweb_bi|icon|banner|view\\/log|adsense|ad_|profile|avatar)/i.test(src); }); } if (!imgs.length) { const og = doc.querySelector('meta[property=\"og:image\"]'); if (og && og.getAttribute('content')) imgs = [og.getAttribute('content')]; } result.images = Array.from(new Set(imgs)).join(' | '); } } catch(e) { result.content = 'DETAIL_FETCH_ERROR: ' + e.message; } window.__ruliwebDetailCache[url] = result; return result; };",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "rowSelector": "tr.table_body.blocktarget",
        "fileName": "ruliweb_scraper_retry.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "board",
            "selector": "'승리의 여신: 니케'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating",
            "selector": "'5.7'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_id",
            "selector": ".id",
            "attribute": "text"
          },
          {
            "name": "category",
            "selector": ".divsn a",
            "attribute": "text"
          },
          {
            "name": "title",
            "selector": "(() => { const a = ROW.querySelector('a.subject_link'); return a ? a.textContent.replace(/\\s*\\(\\d+\\)\\s*$/, '').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "title_url",
            "selector": "a.subject_link",
            "attribute": "href"
          },
          {
            "name": "comments",
            "selector": "(() => { const t = ROW.querySelector('.num_reply') ? ROW.querySelector('.num_reply').textContent : ''; const m = t.match(/\\d+/); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "author",
            "selector": ".writer a",
            "attribute": "text"
          },
          {
            "name": "author_profile_url",
            "selector": "(() => { const id = ROW.querySelector('input.member_srl') ? ROW.querySelector('input.member_srl').value : ''; return id ? 'https://bbs.ruliweb.com/game/86188?search_type=member_srl&search_key=' + id : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "recommendations",
            "selector": ".recomd",
            "attribute": "text"
          },
          {
            "name": "views",
            "selector": ".hit",
            "attribute": "text"
          },
          {
            "name": "publication_date",
            "selector": ".time",
            "attribute": "text"
          },
          {
            "name": "post_content",
            "selector": "window.__ruliwebGetDetail(ROW).content",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_images",
            "selector": "window.__ruliwebGetDetail(ROW).images",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "extraction_time",
            "selector": "new Date().toISOString()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2640,
      "position_y": 220,
      "config": {
        "duration": 5,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 3000,
      "position_y": 220,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "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": "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": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 116,
      "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": 116,
      "width": 2480,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "sleep-2",
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1848,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2208,
      "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": 2928,
      "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 Ruliweb community/search-result posts from the sample 승리의 여신: 니케 member-search listing, including board name, rating, post ID, category, title, URL, comments, author, author profile/search URL, recommendations, views, date, detail-page content, detail-page images, and extraction time. Pagination is implemented with a known URL list for pages 1-6 and append-mode CSV output. Detail content/images are fetched from each row's same-origin post URL using injected JavaScript and single-line sanitized values. Ruliweb may temporarily time out or rate-limit repeated automated runs; if net::ERR_CONNECTION_TIMED_OUT persists, retry after a cooldown, run in visible browser, or use a proxy/network that can access Ruliweb.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-navigate-1",
      "element_type": "note",
      "title": "Note: Navigate",
      "content": "Multi-URL loop over 6 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 1040,
      "position_y": 200,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `window.__ruliwebDetailCache = window.__ruliwebDetailCache || {}; window.__ruliwebCleanText = functio...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 200,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (board, rating, title, comments, author_profile_url). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 340,
      "height": 130,
      "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": 3200,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}