@heripo/research-radar 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -567,12 +567,12 @@ const parseKhsList = (html) => {
567
567
  const $ = cheerio__namespace.load(html);
568
568
  const posts = [];
569
569
  const baseUrl = 'https://www.khs.go.kr';
570
- $('table.list_t01 tbody tr').each((index, element) => {
570
+ $('table.tbl tbody tr').each((index, element) => {
571
571
  const columns = $(element).find('td');
572
572
  if (columns.length === 0) {
573
573
  return;
574
574
  }
575
- const titleElement = columns.eq(1).find('a');
575
+ const titleElement = columns.eq(1).find('a.b_tit');
576
576
  const relativeHref = titleElement.attr('href');
577
577
  if (!relativeHref) {
578
578
  return;
@@ -580,16 +580,16 @@ const parseKhsList = (html) => {
580
580
  const fullUrl = new URL(relativeHref, baseUrl);
581
581
  const detailUrl = fullUrl.href;
582
582
  const uniqId = fullUrl.searchParams.get('id') ?? undefined;
583
- const title = titleElement.attr('title')?.trim() ?? titleElement.text()?.trim() ?? '';
583
+ const title = titleElement.find('span').first().text()?.trim() ??
584
+ titleElement.text()?.trim() ??
585
+ '';
584
586
  const date = getDate(columns.eq(3).text().trim());
585
- const endDate = getDate(columns.eq(4).text().trim());
586
- const hasEndDate = new Date(endDate) > new Date();
587
587
  posts.push({
588
588
  uniqId,
589
589
  title,
590
- date: hasEndDate ? `${date} ~ ${endDate}` : date,
590
+ date,
591
591
  detailUrl: cleanUrl(detailUrl),
592
- dateType: hasEndDate ? core.DateType.DURATION : core.DateType.REGISTERED,
592
+ dateType: core.DateType.REGISTERED,
593
593
  });
594
594
  });
595
595
  return posts;
@@ -598,20 +598,22 @@ const parseKhsGalleryList = (html) => {
598
598
  const $ = cheerio__namespace.load(html);
599
599
  const posts = [];
600
600
  const baseUrl = 'https://www.khs.go.kr';
601
- $('ul.photo_board li a').each((index, element) => {
602
- const relativeHref = $(element).attr('href');
601
+ $('ul.board-list > li').each((index, element) => {
602
+ const linkElement = $(element).find('a').first();
603
+ const relativeHref = linkElement.attr('href');
603
604
  if (!relativeHref) {
604
605
  return;
605
606
  }
606
607
  const fullUrl = new URL(relativeHref, baseUrl);
607
608
  const detailUrl = fullUrl.href;
608
609
  const uniqId = fullUrl.searchParams.get('nttId') ?? undefined;
609
- const children = $(element).find('div');
610
- const imgElement = children.eq(0).find('img');
611
- const titleElement = children.eq(1).find('strong');
612
- const dateElement = children.eq(2).find('span');
613
- const title = imgElement.attr('alt') || titleElement.text() || '';
614
- const date = getDate(dateElement.text().trim());
610
+ const imgElement = $(element).find('img');
611
+ const titleElement = $(element).find('strong');
612
+ const dateElement = $(element).find('dl dd');
613
+ const title = imgElement.attr('alt')?.replace(/\s*이미지$/, '') ||
614
+ titleElement.text()?.trim() ||
615
+ '';
616
+ const date = getDate(dateElement.first().text().trim());
615
617
  posts.push({
616
618
  uniqId,
617
619
  title,
@@ -626,12 +628,12 @@ const parseKhsLawList = (html) => {
626
628
  const $ = cheerio__namespace.load(html);
627
629
  const posts = [];
628
630
  const baseUrl = 'https://www.khs.go.kr';
629
- $('table.b_list tbody tr').each((index, element) => {
631
+ $('table.tbl tbody tr').each((index, element) => {
630
632
  const columns = $(element).find('td');
631
633
  if (columns.length === 0) {
632
634
  return;
633
635
  }
634
- const titleElement = columns.eq(1).find('a');
636
+ const titleElement = columns.eq(1).find('a.b_tit');
635
637
  const relativeHref = titleElement.attr('href');
636
638
  if (!relativeHref) {
637
639
  return;
@@ -639,7 +641,9 @@ const parseKhsLawList = (html) => {
639
641
  const fullUrl = new URL(relativeHref, baseUrl);
640
642
  const detailUrl = fullUrl.href;
641
643
  const uniqId = fullUrl.searchParams.get('id') ?? undefined;
642
- const title = titleElement.attr('title')?.trim() ?? titleElement.text().trim() ?? '';
644
+ const title = titleElement.find('span').first().text()?.trim() ??
645
+ titleElement.text().trim() ??
646
+ '';
643
647
  const date = getDate(columns.eq(4).text().trim());
644
648
  const hasEndDate = date.includes('~');
645
649
  posts.push({
@@ -656,7 +660,7 @@ const parseKhsTenderList = (html) => {
656
660
  const $ = cheerio__namespace.load(html);
657
661
  const posts = [];
658
662
  const baseUrl = 'https://www.khs.go.kr';
659
- $('table.b_list tbody tr').each((index, element) => {
663
+ $('table.tbl tbody tr').each((index, element) => {
660
664
  const columns = $(element).find('td');
661
665
  if (columns.length === 0)
662
666
  return;
@@ -667,7 +671,8 @@ const parseKhsTenderList = (html) => {
667
671
  const fullUrl = new URL(relativeHref, baseUrl);
668
672
  const detailUrl = fullUrl.href;
669
673
  const uniqId = fullUrl.searchParams.get('id') ?? undefined;
670
- const title = titleElement.text().trim();
674
+ const title = titleElement.find('span').first().text()?.trim() ||
675
+ titleElement.text().trim();
671
676
  const date = getDate(columns.eq(4).text().trim());
672
677
  posts.push({
673
678
  uniqId,
@@ -681,8 +686,8 @@ const parseKhsTenderList = (html) => {
681
686
  };
682
687
  const parseKhsDetail = async (html) => {
683
688
  const $ = cheerio__namespace.load(html);
684
- const content = $('div.b_content');
685
- const fileCount = $('dl.b_file dd ul li').length;
689
+ const content = $('div.board-view-content');
690
+ const fileCount = $('.file-container ul.box-group-area li').length;
686
691
  return {
687
692
  detailContent: new TurndownService().turndown(content.html() ?? ''),
688
693
  hasAttachedFile: fileCount > 0,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -546,12 +546,12 @@ const parseKhsList = (html) => {
546
546
  const $ = cheerio.load(html);
547
547
  const posts = [];
548
548
  const baseUrl = 'https://www.khs.go.kr';
549
- $('table.list_t01 tbody tr').each((index, element) => {
549
+ $('table.tbl tbody tr').each((index, element) => {
550
550
  const columns = $(element).find('td');
551
551
  if (columns.length === 0) {
552
552
  return;
553
553
  }
554
- const titleElement = columns.eq(1).find('a');
554
+ const titleElement = columns.eq(1).find('a.b_tit');
555
555
  const relativeHref = titleElement.attr('href');
556
556
  if (!relativeHref) {
557
557
  return;
@@ -559,16 +559,16 @@ const parseKhsList = (html) => {
559
559
  const fullUrl = new URL(relativeHref, baseUrl);
560
560
  const detailUrl = fullUrl.href;
561
561
  const uniqId = fullUrl.searchParams.get('id') ?? undefined;
562
- const title = titleElement.attr('title')?.trim() ?? titleElement.text()?.trim() ?? '';
562
+ const title = titleElement.find('span').first().text()?.trim() ??
563
+ titleElement.text()?.trim() ??
564
+ '';
563
565
  const date = getDate(columns.eq(3).text().trim());
564
- const endDate = getDate(columns.eq(4).text().trim());
565
- const hasEndDate = new Date(endDate) > new Date();
566
566
  posts.push({
567
567
  uniqId,
568
568
  title,
569
- date: hasEndDate ? `${date} ~ ${endDate}` : date,
569
+ date,
570
570
  detailUrl: cleanUrl(detailUrl),
571
- dateType: hasEndDate ? DateType.DURATION : DateType.REGISTERED,
571
+ dateType: DateType.REGISTERED,
572
572
  });
573
573
  });
574
574
  return posts;
@@ -577,20 +577,22 @@ const parseKhsGalleryList = (html) => {
577
577
  const $ = cheerio.load(html);
578
578
  const posts = [];
579
579
  const baseUrl = 'https://www.khs.go.kr';
580
- $('ul.photo_board li a').each((index, element) => {
581
- const relativeHref = $(element).attr('href');
580
+ $('ul.board-list > li').each((index, element) => {
581
+ const linkElement = $(element).find('a').first();
582
+ const relativeHref = linkElement.attr('href');
582
583
  if (!relativeHref) {
583
584
  return;
584
585
  }
585
586
  const fullUrl = new URL(relativeHref, baseUrl);
586
587
  const detailUrl = fullUrl.href;
587
588
  const uniqId = fullUrl.searchParams.get('nttId') ?? undefined;
588
- const children = $(element).find('div');
589
- const imgElement = children.eq(0).find('img');
590
- const titleElement = children.eq(1).find('strong');
591
- const dateElement = children.eq(2).find('span');
592
- const title = imgElement.attr('alt') || titleElement.text() || '';
593
- const date = getDate(dateElement.text().trim());
589
+ const imgElement = $(element).find('img');
590
+ const titleElement = $(element).find('strong');
591
+ const dateElement = $(element).find('dl dd');
592
+ const title = imgElement.attr('alt')?.replace(/\s*이미지$/, '') ||
593
+ titleElement.text()?.trim() ||
594
+ '';
595
+ const date = getDate(dateElement.first().text().trim());
594
596
  posts.push({
595
597
  uniqId,
596
598
  title,
@@ -605,12 +607,12 @@ const parseKhsLawList = (html) => {
605
607
  const $ = cheerio.load(html);
606
608
  const posts = [];
607
609
  const baseUrl = 'https://www.khs.go.kr';
608
- $('table.b_list tbody tr').each((index, element) => {
610
+ $('table.tbl tbody tr').each((index, element) => {
609
611
  const columns = $(element).find('td');
610
612
  if (columns.length === 0) {
611
613
  return;
612
614
  }
613
- const titleElement = columns.eq(1).find('a');
615
+ const titleElement = columns.eq(1).find('a.b_tit');
614
616
  const relativeHref = titleElement.attr('href');
615
617
  if (!relativeHref) {
616
618
  return;
@@ -618,7 +620,9 @@ const parseKhsLawList = (html) => {
618
620
  const fullUrl = new URL(relativeHref, baseUrl);
619
621
  const detailUrl = fullUrl.href;
620
622
  const uniqId = fullUrl.searchParams.get('id') ?? undefined;
621
- const title = titleElement.attr('title')?.trim() ?? titleElement.text().trim() ?? '';
623
+ const title = titleElement.find('span').first().text()?.trim() ??
624
+ titleElement.text().trim() ??
625
+ '';
622
626
  const date = getDate(columns.eq(4).text().trim());
623
627
  const hasEndDate = date.includes('~');
624
628
  posts.push({
@@ -635,7 +639,7 @@ const parseKhsTenderList = (html) => {
635
639
  const $ = cheerio.load(html);
636
640
  const posts = [];
637
641
  const baseUrl = 'https://www.khs.go.kr';
638
- $('table.b_list tbody tr').each((index, element) => {
642
+ $('table.tbl tbody tr').each((index, element) => {
639
643
  const columns = $(element).find('td');
640
644
  if (columns.length === 0)
641
645
  return;
@@ -646,7 +650,8 @@ const parseKhsTenderList = (html) => {
646
650
  const fullUrl = new URL(relativeHref, baseUrl);
647
651
  const detailUrl = fullUrl.href;
648
652
  const uniqId = fullUrl.searchParams.get('id') ?? undefined;
649
- const title = titleElement.text().trim();
653
+ const title = titleElement.find('span').first().text()?.trim() ||
654
+ titleElement.text().trim();
650
655
  const date = getDate(columns.eq(4).text().trim());
651
656
  posts.push({
652
657
  uniqId,
@@ -660,8 +665,8 @@ const parseKhsTenderList = (html) => {
660
665
  };
661
666
  const parseKhsDetail = async (html) => {
662
667
  const $ = cheerio.load(html);
663
- const content = $('div.b_content');
664
- const fileCount = $('dl.b_file dd ul li').length;
668
+ const content = $('div.board-view-content');
669
+ const fileCount = $('.file-container ul.box-group-area li').length;
665
670
  return {
666
671
  detailContent: new TurndownService().turndown(content.html() ?? ''),
667
672
  hasAttachedFile: fileCount > 0,
package/dist/index.js.map C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@heripo/research-radar",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "2.3.3",
5
+ "version": "2.3.4",
6
6
  "description": "AI-driven intelligence for Korean cultural heritage. This package serves as both a ready-to-use newsletter service and a practical implementation example for the LLM-Newsletter-Kit.",
7
7
  "main": "dist/index.cjs",
8
8
  "module": "dist/index.js",