diggylab 0.1.46 → 0.1.47

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.
Files changed (2) hide show
  1. package/cli.js +3 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -638,14 +638,14 @@ function pickCommentText(texts, authorName) {
638
638
  }
639
639
  var COMMENT_UI_LABELS = /^(?:follow|theo dõi|like|thích|reply|trả lời|share|chia sẻ|see more|xem thêm|hide|ẩn|report|báo cáo)$/i;
640
640
  function commentKeyText(text) {
641
- const normalized = text.replace(/[\p{Extended_Pictographic}\u200d\uFE0F]/gu, "").replace(/[:;=8xX]-?[)(\]\[dDpP/\\|]+/g, "").replace(/\s+/g, " ").trim();
642
- return normalized || text.replace(/\s+/g, " ");
641
+ const normalized = text.replace(/[\p{Extended_Pictographic}\u200d\uFE0F]/gu, "").replace(/[:;=8xX]-?[)(\]\[dDpP/\\|]+/g, "").replace(/\s+/g, "");
642
+ return normalized || text.replace(/\s+/g, "");
643
643
  }
644
644
  function parseCommentAuthor(label) {
645
645
  const match = /^(?:bình luận|comment|trả lời|reply)\s+(?:dưới tên|by)\s+(.+)$/i.exec(label.trim());
646
646
  if (!match)
647
647
  return void 0;
648
- const name = match[1].replace(/\s+vào\s+.*$/i, "").replace(/\s+on\s+.*$/i, "").replace(/\s+to\s+.*$/i, "").replace(/\s+\d+\s*(?:giây|phút|giờ|ngày|tuần|tháng|năm|seconds?|minutes?|hours?|days?|weeks?|months?|years?)\s*(?:ago|trước)?\s*$/i, "").trim();
648
+ const name = match[1].replace(/\s+vào\s+.*$/i, "").replace(/\s+on\s+.*$/i, "").replace(/\s+to\s+.*$/i, "").replace(/\s+a\s+few\s+(?:seconds?|minutes?|hours?|days?)\s+ago\s*$/i, "").replace(/\s+(?:just\s+now|vừa\s+xong)\s*$/i, "").replace(/\s+(?:\d+|a|an|one|một|vài|few|several)\s+(?:giây|phút|giờ|ngày|tuần|tháng|năm|seconds?|minutes?|hours?|days?|weeks?|months?|years?)\s+(?:ago|trước)\s*$/i, "").trim();
649
649
  return name || void 0;
650
650
  }
651
651
  function parseCommentDepth(label) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diggylab",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "DiggyLab Desktop Agent collects posts and information from Facebook Groups on a paired computer. (headless CLI)",
5
5
  "type": "module",
6
6
  "bin": {