Skip to content

Commit

Permalink
optimize: weibo dynamic skip type: bigPic
Browse files Browse the repository at this point in the history
  • Loading branch information
snowtafir committed Dec 28, 2024
1 parent 8a240ab commit 0c4332a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions models/weibo/weibo.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ export class WeiboQuery {
return 'DYNAMIC_TYPE_AV';
} else if (raw_post?.mblog?.pics) {
return 'DYNAMIC_TYPE_DRAW';
} else {
} else if (!raw_post?.mblog?.pics && String(raw_post?.mblog?.text).trim().length > 0) {
return 'DYNAMIC_TYPE_ARTICLE';
} else {
return 'DYNAMIC_TYPE_UNKNOWN';
}
}

Expand Down Expand Up @@ -85,7 +87,7 @@ export class WeiboQuery {

/**头像框 */
formatData.data.pendant = '';

/**生成日期 */
formatData.data.created = moment().format('YYYY年MM月DD日 HH:mm:ss');

formatData.data.type = type;
Expand Down Expand Up @@ -134,6 +136,8 @@ export class WeiboQuery {
formatData.data.orig = await this.formatDynamicData(origin_post_info);
formatData.data.category = '转发动态';
break;
default:
break;
}

return {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yuki-plugin",
"version": "2.0.6-3",
"version": "2.0.6-4",
"author": "snowtafir",
"description": "优纪插件,yunzai-V4 关于 微博推送、B站推送 等功能的拓展插件",
"main": "./index",
Expand Down

0 comments on commit 0c4332a

Please sign in to comment.