From 0c4332a099164b253b4f7b6cfd4b6666a22e859f Mon Sep 17 00:00:00 2001 From: snowtafir Date: Sun, 29 Dec 2024 00:14:23 +0800 Subject: [PATCH] optimize: weibo dynamic skip type: bigPic --- models/weibo/weibo.query.ts | 8 ++++++-- package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/models/weibo/weibo.query.ts b/models/weibo/weibo.query.ts index a85684c..ee024e1 100644 --- a/models/weibo/weibo.query.ts +++ b/models/weibo/weibo.query.ts @@ -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'; } } @@ -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; @@ -134,6 +136,8 @@ export class WeiboQuery { formatData.data.orig = await this.formatDynamicData(origin_post_info); formatData.data.category = '转发动态'; break; + default: + break; } return { diff --git a/package.json b/package.json index 063bb1a..fba26b5 100644 --- a/package.json +++ b/package.json @@ -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",