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 487df94 commit a8bfbbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yz-yuki-plugin",
"version": "2.0.6-3",
"version": "2.0.6-4",
"description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
"author": "snowtafir",
"type": "module",
Expand Down Expand Up @@ -60,6 +60,7 @@
"axios": "^1.7.9",
"chokidar": "^4.0.1",
"husky": "^9.1.6",
"icqq": "^0.6.10",
"jsdom": "^24.1.1",
"json5": "^2.2.3",
"jsxp": "^1.0.8",
Expand Down
8 changes: 6 additions & 2 deletions src/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

0 comments on commit a8bfbbc

Please sign in to comment.