Created
April 7, 2026 08:32
-
-
Save claudianus/638b1de72ae9cbb92995bb3fb147da48 to your computer and use it in GitHub Desktop.
TrendSight 블라인드(Blind) 크롤러 파싱 스크립트 백업 - AI Agent 자동생성 (list v34, comments v1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const results = []; | |
| const postTitle = $('.article-view-head h2').text().trim(); | |
| const postContent = $('#contentArea').text().trim(); | |
| const author = $('.article-view-head .name a.point').text().trim(); | |
| const date = $('.article-view-head .wrap-info .date').text().trim(); | |
| const viewCount = parseInt($('.article-view-head .wrap-info .pv').text().replace(/[^0-9]/g, '') || '0'); | |
| const likeCount = parseInt($('.article_info .info .like').text().replace(/[^0-9]/g, '') || '0'); | |
| const commentCount = parseInt($('.article_info .info .cmt').text().replace(/[^0-9]/g, '') || '0'); | |
| results.push({ | |
| externalId: url.split('/').pop(), | |
| title: postTitle, | |
| link: url, | |
| summary: postContent, | |
| date: date, | |
| viewCount: viewCount, | |
| likeCount: likeCount, | |
| commentCount: commentCount, | |
| author: author | |
| }); | |
| return results; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const items = []; | |
| const elements = $('.article-list > div.article-list-pre'); | |
| elements.each((i, el) => { | |
| const $el = $(el); | |
| if ($el.hasClass('article-list-ad') || $el.hasClass('coupang-ad')) return; | |
| // Find title link | |
| const titleLink = $el.find('.tit h3 a'); | |
| const href = titleLink.attr('href'); | |
| if (!href) return; | |
| // Construct full link | |
| const fullLink = new URL(href, 'https://www.teamblind.com').href; | |
| const title = titleLink.text().trim(); | |
| const summary = $el.find('.pre-txt a').text().trim(); | |
| // Split author/company text | |
| const authorText = $el.find('.sub .name a').text().trim(); | |
| const parts = authorText.split('·'); | |
| const author = parts.length > 1 ? parts[1].trim() : (parts[0].trim() || 'Unknown'); | |
| const viewCount = parseInt($el.find('.pv').text().replace(/[^0-9]/g, '') || 0); | |
| const likeCount = parseInt($el.find('.like').text().replace(/[^0-9]/g, '') || 0); | |
| const commentCount = parseInt($el.find('.cmt').text().replace(/[^0-9]/g, '') || 0); | |
| // Fix externalID extraction | |
| const externalId = href.split('/').pop() || ''; | |
| items.push({ | |
| externalId, | |
| title, | |
| link: fullLink, | |
| summary, | |
| author, | |
| viewCount, | |
| likeCount, | |
| commentCount | |
| }); | |
| }); | |
| return items; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment