Skip to content

Commit 7685bf4

Browse files
committed
feat: 视频过滤器新增属性authorAccountCertInfo #96
1 parent 21e64d5 commit 7685bf4

8 files changed

+105
-58
lines changed

scripts-vite/抖音优化/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
| musicAlbum | String | 视频的背景音乐专辑名 | |
5353
| musicAuthor | String | 视频的背景音乐作者 | |
5454
| musicTitle | String | 视频的背景音乐标题名称 | |
55+
| authorAccountCertInfo | String | 作者的认证信息 | 例如:`剧情创作者、娱乐视频自媒体` |
5556
| authorCustomVerify | String | | |
5657
| authorEnterpriseVerifyReason | String | 作者的企业认证信息 | 例如:`腾讯视频动漫官方账号` |
5758
| riskInfoContent | String | 风险提示内容 | 例如:`作者声明:虚构演绎,仅供娱乐` |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"time": 1746522017236,
3-
"version": "2025.5.6"
2+
"time": 1746602177325,
3+
"version": "2025.5.7"
44
}

scripts-vite/抖音优化/dist/抖音优化.meta.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts-vite/抖音优化/dist/抖音优化.min.meta.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts-vite/抖音优化/dist/抖音优化.min.user.js

Lines changed: 48 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts-vite/抖音优化/dist/抖音优化.user.js

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name 抖音优化
33
// @namespace https://github.com/WhiteSevs/TamperMonkeyScript
4-
// @version 2025.5.6
4+
// @version 2025.5.7
55
// @author WhiteSevs
66
// @description 视频过滤,包括广告、直播或自定义规则,伪装登录、屏蔽登录弹窗、自定义清晰度选择、未登录解锁画质选择、禁止自动播放、自动进入全屏、双击进入全屏、屏蔽弹幕和礼物特效、手机模式、修复进度条拖拽、自定义视频和评论区背景色等
77
// @license GPL-3.0-only
@@ -5181,7 +5181,7 @@
51815181
* @param showLog 是否显示日志输出
51825182
*/
51835183
parseAwemeInfoDictData(awemeInfo, showLog = false) {
5184-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
5184+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
51855185
let authorInfo = (awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) || // @ts-ignore
51865186
(awemeInfo == null ? void 0 : awemeInfo["author"]);
51875187
let nickname = (_a2 = authorInfo == null ? void 0 : authorInfo["nickname"]) == null ? void 0 : _a2.toString();
@@ -5333,15 +5333,30 @@
53335333
});
53345334
}
53355335
suggestWord = [...new Set(suggestWord)];
5336+
let authorAccountCertInfo = "";
5337+
let authorAccountCertInfoInsStr = (
5338+
// @ts-ignore
5339+
(_w = awemeInfo == null ? void 0 : awemeInfo["author"]) == null ? void 0 : _w["account_cert_info"]
5340+
);
5341+
if (typeof authorAccountCertInfoInsStr === "string") {
5342+
let authorAccountCertInfoJSON = utils.toJSON(authorAccountCertInfoInsStr);
5343+
if (typeof authorAccountCertInfoJSON["label_text"] === "string") {
5344+
authorAccountCertInfo = authorAccountCertInfoJSON["label_text"];
5345+
}
5346+
} else {
5347+
if (typeof ((_y = (_x = awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) == null ? void 0 : _x["accountCertInfo"]) == null ? void 0 : _y["labelText"]) === "string") {
5348+
authorAccountCertInfo = (_A = (_z = awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) == null ? void 0 : _z["accountCertInfo"]) == null ? void 0 : _A["labelText"];
5349+
}
5350+
}
53365351
let authorCustomVerify = (
53375352
// @ts-ignore
5338-
((_w = awemeInfo == null ? void 0 : awemeInfo["author"]) == null ? void 0 : _w["custom_verify"]) || // @ts-ignore
5339-
((_x = awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) == null ? void 0 : _x["customVerify"]) || ""
5353+
((_B = awemeInfo == null ? void 0 : awemeInfo["author"]) == null ? void 0 : _B["custom_verify"]) || // @ts-ignore
5354+
((_C = awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) == null ? void 0 : _C["customVerify"]) || ""
53405355
);
53415356
let authorEnterpriseVerifyReason = (
53425357
// @ts-ignore
5343-
((_y = awemeInfo == null ? void 0 : awemeInfo["author"]) == null ? void 0 : _y["enterprise_verify_reason"]) || // @ts-ignore
5344-
((_z = awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) == null ? void 0 : _z["enterpriseVerifyReason"]) || ""
5358+
((_D = awemeInfo == null ? void 0 : awemeInfo["author"]) == null ? void 0 : _D["enterprise_verify_reason"]) || // @ts-ignore
5359+
((_E = awemeInfo == null ? void 0 : awemeInfo["authorInfo"]) == null ? void 0 : _E["enterpriseVerifyReason"]) || ""
53455360
);
53465361
return {
53475362
awemeId,
@@ -5355,6 +5370,7 @@
53555370
musicAlbum,
53565371
musicAuthor,
53575372
musicTitle,
5373+
authorAccountCertInfo,
53585374
authorCustomVerify,
53595375
authorEnterpriseVerifyReason,
53605376
riskInfoContent,
@@ -6208,6 +6224,7 @@
62086224
"musicAlbum",
62096225
"musicAuthor",
62106226
"musicTitle",
6227+
"authorAccountCertInfo",
62116228
"authorCustomVerify",
62126229
"authorEnterpriseVerifyReason",
62136230
"riskInfoContent",

scripts-vite/抖音优化/src/main/video/DouYinVideoFilter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ export const DouYinVideoFilter = {
857857
"musicAlbum",
858858
"musicAuthor",
859859
"musicTitle",
860+
"authorAccountCertInfo",
860861
"authorCustomVerify",
861862
"authorEnterpriseVerifyReason",
862863
"riskInfoContent",

scripts-vite/抖音优化/src/main/video/DouYinVideoFilterBase.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export interface DouYinVideoHandlerInfo {
3030
musicAuthor?: string;
3131
/** 视频的背景音乐标题名称 */
3232
musicTitle?: string;
33+
/** 作者的认证信息 */
34+
authorAccountCertInfo: string;
3335
/** */
3436
authorCustomVerify: string;
3537
/** 作者的企业认证信息 */
@@ -76,6 +78,11 @@ export type DouYinVideoAwemeInfo = {
7678
nickname: string;
7779
/** 视频创作者uid */
7880
uid: string;
81+
/** 认证信息 */
82+
accountCertInfo: {
83+
labelStyle: number;
84+
labelText: string;
85+
};
7986
};
8087
/** 视频id */
8188
awemeId: string;
@@ -642,6 +649,26 @@ export class DouYinVideoFilterBase {
642649
// 去重
643650
suggestWord = [...new Set(suggestWord)];
644651

652+
/** 作者的认证信息 */
653+
let authorAccountCertInfo = "";
654+
let authorAccountCertInfoInsStr =
655+
// @ts-ignore
656+
awemeInfo?.["author"]?.["account_cert_info"];
657+
if (typeof authorAccountCertInfoInsStr === "string") {
658+
let authorAccountCertInfoJSON = utils.toJSON(authorAccountCertInfoInsStr);
659+
if (typeof authorAccountCertInfoJSON["label_text"] === "string") {
660+
authorAccountCertInfo = authorAccountCertInfoJSON["label_text"];
661+
}
662+
} else {
663+
if (
664+
typeof awemeInfo?.["authorInfo"]?.["accountCertInfo"]?.["labelText"] ===
665+
"string"
666+
) {
667+
authorAccountCertInfo =
668+
awemeInfo?.["authorInfo"]?.["accountCertInfo"]?.["labelText"];
669+
}
670+
}
671+
645672
let authorCustomVerify =
646673
// @ts-ignore
647674
awemeInfo?.["author"]?.["custom_verify"] ||
@@ -669,6 +696,7 @@ export class DouYinVideoFilterBase {
669696
musicAlbum,
670697
musicAuthor,
671698
musicTitle,
699+
authorAccountCertInfo,
672700
authorCustomVerify,
673701
authorEnterpriseVerifyReason,
674702
riskInfoContent,

0 commit comments

Comments
 (0)