yz-yuki-plugin 2.0.4-4 → 2.0.4-5

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.
@@ -24,5 +24,6 @@ const Account = ({ data }) => {
24
24
  data.appName === 'weibo' && renderLogo(Weibilogo, 'weibo-logo'),
25
25
  React.createElement(LogoText, { data: data })))));
26
26
  };
27
+ var Account$1 = Account;
27
28
 
28
- export { Account as default };
29
+ export { Account$1 as default };
@@ -118,5 +118,6 @@ const Content = ({ data }) => {
118
118
  picItems)));
119
119
  }
120
120
  };
121
+ var Content$1 = Content;
121
122
 
122
- export { Content as default };
123
+ export { Content$1 as default };
@@ -34,5 +34,6 @@ const Footer = ({ data }) => {
34
34
  React.createElement("span", { className: "italic" }, yukiPluginVersion))),
35
35
  React.createElement("img", { src: data.urlImgData, alt: "\u4E8C\u7EF4\u7801", className: "qr-code" }))));
36
36
  };
37
+ var Footer$1 = Footer;
37
38
 
38
- export { Footer as default };
39
+ export { Footer$1 as default };
@@ -13,5 +13,6 @@ const ForwardContent = ({ data }) => (React.createElement(React.Fragment, null,
13
13
  React.createElement("div", { className: "orig-container", id: "orig-container" },
14
14
  React.createElement(Account, { data: data }),
15
15
  React.createElement(Content, { data: data })))));
16
+ var ForwardContent$1 = ForwardContent;
16
17
 
17
- export { ForwardContent as default };
18
+ export { ForwardContent$1 as default };
@@ -1,6 +1,6 @@
1
1
  import moment from 'moment';
2
2
  import { Bot, Segment } from 'yunzai';
3
- import { readSyncCookie } from './bilibili.models.js';
3
+ import { readSyncCookie, cookieWithBiliTicket } from './bilibili.models.js';
4
4
  import { BiliApi } from './bilibili.api.js';
5
5
  import axios from 'axios';
6
6
  import lodash from 'lodash';
@@ -229,10 +229,11 @@ class BiliQuery {
229
229
  * @returns {Json} 完整的B站文章内容json数据
230
230
  */
231
231
  static async getFullArticleContent(postUrl) {
232
- const Cookie = await readSyncCookie();
232
+ let { cookie } = await readSyncCookie();
233
+ cookie = await cookieWithBiliTicket(cookie);
233
234
  try {
234
235
  const response = await axios.get(postUrl, {
235
- headers: lodash.merge(BiliApi.BILIBILI_ARTICLE_HEADERS, { "Cookie": `${Cookie}`, "Host": "www.bilibili.com" }),
236
+ headers: lodash.merge(BiliApi.BILIBILI_ARTICLE_HEADERS, { "Cookie": `${cookie}`, "Host": "www.bilibili.com" }),
236
237
  responseType: 'text'
237
238
  });
238
239
  const text = response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "2.0.4-4",
3
+ "version": "2.0.4-5",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",