yz-yuki-plugin 2.0.5-7 → 2.0.5-8
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.
|
@@ -21,9 +21,8 @@ class BiliApi {
|
|
|
21
21
|
/**header */
|
|
22
22
|
static BILIBILI_HEADERS = {
|
|
23
23
|
'Accept': '*/*',
|
|
24
|
-
'Accept-Language': 'zh-CN,
|
|
25
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
26
|
-
'Content-type': 'application/json;charset=UTF-8',
|
|
24
|
+
'Accept-Language': 'zh-CN,en-US;q=0.5',
|
|
25
|
+
'Accept-Encoding': 'gzip, deflate, br, zstd',
|
|
27
26
|
'Cookie': '',
|
|
28
27
|
'pragma': 'no-cache',
|
|
29
28
|
'Cache-control': 'max-age=0',
|
|
@@ -35,15 +34,15 @@ class BiliApi {
|
|
|
35
34
|
'Sec-Fetch-Mode': 'cors',
|
|
36
35
|
'Sec-Fetch-Site': 'same-site',
|
|
37
36
|
'Sec-Fetch-User': '?0',
|
|
37
|
+
'Priority': 'u=4',
|
|
38
38
|
'TE': 'trailers',
|
|
39
|
-
'
|
|
40
|
-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0'
|
|
39
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0'
|
|
41
40
|
};
|
|
42
41
|
/**Login header */
|
|
43
42
|
static BIlIBILI_LOGIN_HEADERS = {
|
|
44
43
|
'Accept': '*/*',
|
|
45
|
-
'Accept-Language': 'zh-CN,
|
|
46
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
44
|
+
'Accept-Language': 'zh-CN,en-US;q=0.5',
|
|
45
|
+
'Accept-Encoding': 'gzip, deflate, br, zstd',
|
|
47
46
|
'DNT': '1',
|
|
48
47
|
'Sec-GPC': '1',
|
|
49
48
|
'Upgrade-Insecure-Requests': '1',
|
|
@@ -56,8 +55,8 @@ class BiliApi {
|
|
|
56
55
|
/**FullArticle header */
|
|
57
56
|
static BILIBILI_ARTICLE_HEADERS = {
|
|
58
57
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8',
|
|
59
|
-
'Accept-Language': 'zh-CN,
|
|
60
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
58
|
+
'Accept-Language': 'zh-CN,en-US;q=0.5',
|
|
59
|
+
'Accept-Encoding': 'gzip, deflate, br, zstd',
|
|
61
60
|
'Content-type': 'text/html; charset=utf-8',
|
|
62
61
|
'Cookie': '',
|
|
63
62
|
'pragma': 'no-cache',
|
|
@@ -71,7 +70,7 @@ class BiliApi {
|
|
|
71
70
|
'Sec-Fetch-User': '?1',
|
|
72
71
|
'TE': 'trailers',
|
|
73
72
|
'Upgrade-Insecure-Requests': '1',
|
|
74
|
-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:
|
|
73
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0'
|
|
75
74
|
};
|
|
76
75
|
}
|
|
77
76
|
|
|
@@ -37,8 +37,8 @@ class BiliGetWebData {
|
|
|
37
37
|
headers: lodash.merge(BiliApi.BILIBILI_HEADERS, {
|
|
38
38
|
Cookie: `${cookie}`,
|
|
39
39
|
Host: `api.bilibili.com`,
|
|
40
|
-
Origin: 'https://
|
|
41
|
-
Referer: `https://
|
|
40
|
+
Origin: 'https://space.bilibili.com',
|
|
41
|
+
Referer: `https://space.bilibili.com/${uid}/dynamic`
|
|
42
42
|
})
|
|
43
43
|
});
|
|
44
44
|
return res;
|
|
@@ -83,12 +83,12 @@ class BiliTask {
|
|
|
83
83
|
}
|
|
84
84
|
else if (resp.code !== 0) {
|
|
85
85
|
logger.error(`获取 ${subInfoOfup.uid} 动态失败,resCode:${resp.code}`);
|
|
86
|
-
|
|
86
|
+
return;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
logger.error(`获取 ${subInfoOfup.uid} 动态失败,无响应数据,请待下次任务自动重试`);
|
|
91
|
-
|
|
91
|
+
return;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
const chatIds = Array.from(new Set([...Object((chatTypeMap.get(subInfoOfup.uid) && chatTypeMap.get(subInfoOfup.uid).chatIds) || []), chatId]));
|