socialdatax-skills 0.2.43 → 0.2.44
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/README.md +6 -5
- package/cli.mjs +23 -4
- package/package.json +1 -1
- package/skills/media-comments/SKILL.md +3 -2
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ Common search phrases for this skill package:
|
|
|
89
89
|
- Reserved future SocialDataX namespace names for existing platform listings without draft files yet: `com.socialdatax/kuaishou-insights`, `com.socialdatax/bilibili-insights`, `com.socialdatax/weibo-insights`, `com.socialdatax/wechat-channels-insights`, `com.socialdatax/zhihu-insights`, `com.socialdatax/instagram-insights`, `com.socialdatax/x-insights`, `com.socialdatax/youtube-insights`, and `com.socialdatax/tiktok-insights`.
|
|
90
90
|
- Hosted endpoint without a repo-tracked standalone listing: Sensitive Words Check.
|
|
91
91
|
- Unified MCP registry name: none; this package installs skills and calls explicit hosted MCP entries.
|
|
92
|
-
- Current public capability version: `0.2.
|
|
92
|
+
- Current public capability version: `0.2.44`
|
|
93
93
|
|
|
94
94
|
## Direct CLI
|
|
95
95
|
|
|
@@ -169,6 +169,7 @@ npx -y socialdatax-skills@latest weibo search --keyword "露营" --pretty
|
|
|
169
169
|
npx -y socialdatax-skills@latest weibo detail --post-id "<post_id>" --pretty
|
|
170
170
|
npx -y socialdatax-skills@latest weibo detail --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
171
171
|
npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --pretty
|
|
172
|
+
npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --sort-type time_descending --pretty
|
|
172
173
|
npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --all --include-replies --pretty
|
|
173
174
|
npx -y socialdatax-skills@latest weibo comments --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
174
175
|
npx -y socialdatax-skills@latest weibo replies --post-id "<post_id>" --comment-id "<comment_id>" --pretty
|
|
@@ -278,7 +279,7 @@ YouTube reply pagination starts from the returned first-level comment `reply_tok
|
|
|
278
279
|
XHS comments accept optional `--sort-type` values: `default`,
|
|
279
280
|
`time_descending`, and `like_count_descending`; omit it for the platform
|
|
280
281
|
default comment order.
|
|
281
|
-
Bilibili and YouTube comments accept optional `--sort-type` values: `hot` and
|
|
282
|
+
Bilibili, Weibo, and YouTube comments accept optional `--sort-type` values: `hot` and
|
|
282
283
|
`time_descending`; Zhihu comments accept `default` and `time_descending`.
|
|
283
284
|
Omit comment sort values for the platform default order.
|
|
284
285
|
|
|
@@ -530,7 +531,7 @@ Current Weibo workflows include:
|
|
|
530
531
|
- Fetch the current Weibo / 微博 hot-search list.
|
|
531
532
|
- Search related Weibo posts by keyword.
|
|
532
533
|
- Resolve a Weibo post URL, short link, share text, or post_id into structured post details.
|
|
533
|
-
- Fetch paginated first-level comments for comment analysis
|
|
534
|
+
- Fetch paginated first-level comments for comment analysis, optionally sorted by `hot` or `time_descending`.
|
|
534
535
|
- Fetch paginated replies under a first-level comment.
|
|
535
536
|
- Continue Weibo list pagination only when `next_page_token` is non-empty; an empty string means there are no more results to request.
|
|
536
537
|
- Read Weibo creator profile data from a user profile link or user_id.
|
|
@@ -706,8 +707,8 @@ Current Sensitive Words Check workflows include:
|
|
|
706
707
|
| `weibo_search_posts` | Search Weibo posts by keyword with optional `page_token` continuation; do not pass `page`. |
|
|
707
708
|
| `weibo_get_post_detail_by_post_id` | Fetch structured Weibo post details when the caller already has a post_id. |
|
|
708
709
|
| `weibo_get_post_detail_by_post_url` | Resolve a Weibo post URL, short link, or share text into structured post details. |
|
|
709
|
-
| `weibo_get_post_comments_by_post_id` | Fetch paginated first-level comments
|
|
710
|
-
| `weibo_get_post_comments_by_post_url` | Fetch paginated first-level comments
|
|
710
|
+
| `weibo_get_post_comments_by_post_id` | Fetch paginated first-level comments by post_id with optional `sort_type` (`hot` or `time_descending`). |
|
|
711
|
+
| `weibo_get_post_comments_by_post_url` | Fetch paginated first-level comments from a Weibo post URL, short link, or share text with optional `sort_type` (`hot` or `time_descending`). |
|
|
711
712
|
| `weibo_get_post_comment_replies_by_comment_id` | Fetch paginated replies under a first-level comment by post_id and comment_id. |
|
|
712
713
|
| `weibo_get_post_liker_list_by_post_id` | Fetch paginated users who liked a Weibo post by post_id. |
|
|
713
714
|
| `weibo_get_post_liker_list_by_post_url` | Fetch paginated users who liked a Weibo post from a post page link, short link, or share text. |
|
package/cli.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import { decryptWechatMediaCommand } from "./lib/media/wechat-decrypt.mjs";
|
|
|
22
22
|
export { decryptWechatMediaCommand };
|
|
23
23
|
|
|
24
24
|
const PACKAGE_NAME = "socialdatax-skills";
|
|
25
|
-
const PACKAGE_VERSION = "0.2.
|
|
25
|
+
const PACKAGE_VERSION = "0.2.44";
|
|
26
26
|
const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
|
|
27
27
|
const LOG_PREFIX = `[${PACKAGE_NAME}]`;
|
|
28
28
|
const MIN_NODE_VERSION = "20.18.1";
|
|
@@ -702,6 +702,7 @@ const WEIBO_DIRECT_ACTION_OPTIONS = {
|
|
|
702
702
|
"all",
|
|
703
703
|
"maxItems",
|
|
704
704
|
"includeReplies",
|
|
705
|
+
"sortType",
|
|
705
706
|
"pretty",
|
|
706
707
|
],
|
|
707
708
|
replies: [
|
|
@@ -739,6 +740,7 @@ const WEIBO_OPTION_DISPLAY_NAMES = {
|
|
|
739
740
|
sinceDays: "--since-days",
|
|
740
741
|
all: "--all",
|
|
741
742
|
includeReplies: "--include-replies",
|
|
743
|
+
sortType: "--sort-type",
|
|
742
744
|
postId: "--post-id",
|
|
743
745
|
postUrl: "--post-url",
|
|
744
746
|
commentId: "--comment-id",
|
|
@@ -751,6 +753,7 @@ const WEIBO_OPTION_DISPLAY_NAMES = {
|
|
|
751
753
|
outputDir: "--output-dir",
|
|
752
754
|
proxy: "--proxy",
|
|
753
755
|
};
|
|
756
|
+
const WEIBO_COMMENT_SORT_TYPES = ["hot", "time_descending"];
|
|
754
757
|
const WECHAT_DIRECT_ACTION_OPTIONS = {
|
|
755
758
|
"hot-search": ["pretty"],
|
|
756
759
|
search: [
|
|
@@ -1251,11 +1254,13 @@ const PLATFORMS = {
|
|
|
1251
1254
|
},
|
|
1252
1255
|
{
|
|
1253
1256
|
name: "weibo_get_post_comments_by_post_id",
|
|
1254
|
-
description:
|
|
1257
|
+
description:
|
|
1258
|
+
"Fetch paginated first-level comments by post_id with optional hot or newest-first sorting.",
|
|
1255
1259
|
},
|
|
1256
1260
|
{
|
|
1257
1261
|
name: "weibo_get_post_comments_by_post_url",
|
|
1258
|
-
description:
|
|
1262
|
+
description:
|
|
1263
|
+
"Fetch paginated first-level comments from a Weibo post URL, short link, or share text with optional hot or newest-first sorting.",
|
|
1259
1264
|
},
|
|
1260
1265
|
{
|
|
1261
1266
|
name: "weibo_get_post_comment_replies_by_comment_id",
|
|
@@ -3357,7 +3362,7 @@ function printHelp() {
|
|
|
3357
3362
|
console.log(" --publish-time-range <all|day|week|month|three_months|half_year|year>");
|
|
3358
3363
|
console.log(" Zhihu search publish-time filter; omit for no filter.");
|
|
3359
3364
|
console.log(" --sort-type <hot|time_descending>");
|
|
3360
|
-
console.log(" X search
|
|
3365
|
+
console.log(" X search, Weibo comments, and YouTube comments sort; omit for default sort.");
|
|
3361
3366
|
console.log(" --sort-type <general|time_descending|view_count_descending|rating>");
|
|
3362
3367
|
console.log(" YouTube search sort; omit for default sort.");
|
|
3363
3368
|
console.log(" --video-type <all|video|movie>");
|
|
@@ -4403,6 +4408,7 @@ function buildWeiboOperation(action, options) {
|
|
|
4403
4408
|
idDisplay: "--post-id",
|
|
4404
4409
|
urlDisplay: "--post-url",
|
|
4405
4410
|
pageToken: options.pageToken,
|
|
4411
|
+
extraArguments: buildWeiboCommentsExtraArguments(options),
|
|
4406
4412
|
}),
|
|
4407
4413
|
PLATFORMS.weibo
|
|
4408
4414
|
);
|
|
@@ -5135,6 +5141,19 @@ function buildXhsCommentsExtraArguments(options) {
|
|
|
5135
5141
|
return toolArguments;
|
|
5136
5142
|
}
|
|
5137
5143
|
|
|
5144
|
+
function buildWeiboCommentsExtraArguments(options) {
|
|
5145
|
+
const toolArguments = {};
|
|
5146
|
+
if (options.sortType !== undefined) {
|
|
5147
|
+
toolArguments.sort_type = parseAllowedStringOption(
|
|
5148
|
+
options.sortType,
|
|
5149
|
+
"--sort-type",
|
|
5150
|
+
WEIBO_COMMENT_SORT_TYPES,
|
|
5151
|
+
WEIBO_COMMENT_SORT_TYPES.join(", ")
|
|
5152
|
+
);
|
|
5153
|
+
}
|
|
5154
|
+
return toolArguments;
|
|
5155
|
+
}
|
|
5156
|
+
|
|
5138
5157
|
function buildTranscriptCall(
|
|
5139
5158
|
options,
|
|
5140
5159
|
{
|
package/package.json
CHANGED
|
@@ -242,6 +242,7 @@ Optional arguments:
|
|
|
242
242
|
- TikTok `--post-id <post_id>` or `--url <tiktok_post_url_or_share_text>`: use for first-level comments; replies require `--post-id <post_id>` and `--comment-id <comment_id>`.
|
|
243
243
|
- Weibo `--post-id <post_id>`: preferred when the Weibo post ID is already known and should anchor the comment thread.
|
|
244
244
|
- Weibo `--post-url <weibo_post_url_or_share_text>`: use for a Weibo post URL, short link, or share text for first-level comments.
|
|
245
|
+
- Weibo comments `--sort-type <hot|time_descending>`: optional first-level comment sort order; omit it for the default `hot` order, and keep it unchanged when continuing with `--page-token`.
|
|
245
246
|
- WeChat Channels / 视频号 `--object-id <object_id>` and `--object-nonce-id <object_nonce_id>`: use together when both values are already known and should anchor the comment thread.
|
|
246
247
|
- WeChat Channels / 视频号 `--url <wechat_video_url_or_share_text>`: use for a WeChat Channels video link or share text for first-level comments.
|
|
247
248
|
- `--source-client socialdatax-skills --source-platform npm --source-skill media-comments`: usage attribution for this Agent Skill; keep these values unchanged when running examples from this Skill.
|
|
@@ -300,8 +301,8 @@ If MCP tools are already available in the current agent, use one of these tools:
|
|
|
300
301
|
- `tiktok_get_post_comments_by_post_id`: use when the TikTok post_id is known.
|
|
301
302
|
- `tiktok_get_post_comments_by_url`: use for TikTok post URLs or share text.
|
|
302
303
|
- `tiktok_get_post_comment_replies`: use when the TikTok post_id and first-level comment ID are known.
|
|
303
|
-
- `weibo_get_post_comments_by_post_id`: use when the post_id is known
|
|
304
|
-
- `weibo_get_post_comments_by_post_url`: use for Weibo post URLs, short links, or share text
|
|
304
|
+
- `weibo_get_post_comments_by_post_id`: use when the post_id is known; optional `sort_type` accepts `hot` or `time_descending`.
|
|
305
|
+
- `weibo_get_post_comments_by_post_url`: use for Weibo post URLs, short links, or share text; optional `sort_type` accepts `hot` or `time_descending`.
|
|
305
306
|
- `weibo_get_post_comment_replies_by_comment_id`: use when the post_id and first-level comment ID are known.
|
|
306
307
|
- For Weibo comments and replies, continue only when `next_page_token` is non-empty; an empty string means there are no more comments or replies to request.
|
|
307
308
|
- `wechat_get_video_comments_by_object_id`: use when both object_id and object_nonce_id are known.
|