koishi-plugin-bilibili-notify 3.4.0 → 3.4.1
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.
- package/lib/index.cjs +2 -2
- package/lib/index.mjs +1 -1
- package/package.json +2 -2
package/lib/index.cjs
CHANGED
|
@@ -52,6 +52,7 @@ let node_https = require("node:https");
|
|
|
52
52
|
node_https = __toESM(node_https);
|
|
53
53
|
let axios = require("axios");
|
|
54
54
|
axios = __toESM(axios);
|
|
55
|
+
let jsdom = require("jsdom");
|
|
55
56
|
let tough_cookie = require("tough-cookie");
|
|
56
57
|
let openai = require("openai");
|
|
57
58
|
openai = __toESM(openai);
|
|
@@ -4411,8 +4412,7 @@ var BiliAPI = class extends koishi.Service {
|
|
|
4411
4412
|
}
|
|
4412
4413
|
const correspondPath = await getCorrespondPath(luxon.DateTime.now().toMillis());
|
|
4413
4414
|
const { data: refreshCsrfHtml } = await this.client.get(`https://www.bilibili.com/correspond/1/${correspondPath}`);
|
|
4414
|
-
const {
|
|
4415
|
-
const { document } = new JSDOM(refreshCsrfHtml).window;
|
|
4415
|
+
const { document } = new jsdom.JSDOM(refreshCsrfHtml).window;
|
|
4416
4416
|
const targetElement = document.getElementById("1-name");
|
|
4417
4417
|
const refresh_csrf = targetElement ? targetElement.textContent : null;
|
|
4418
4418
|
const { data: refreshData } = await this.client.post("https://passport.bilibili.com/x/passport-login/web/cookie/refresh", {
|
package/lib/index.mjs
CHANGED
|
@@ -16,6 +16,7 @@ import crypto from "node:crypto";
|
|
|
16
16
|
import http from "node:http";
|
|
17
17
|
import https from "node:https";
|
|
18
18
|
import axios from "axios";
|
|
19
|
+
import { JSDOM } from "jsdom";
|
|
19
20
|
import { Cookie, CookieJar } from "tough-cookie";
|
|
20
21
|
import OpenAI from "openai";
|
|
21
22
|
|
|
@@ -4386,7 +4387,6 @@ var BiliAPI = class extends Service {
|
|
|
4386
4387
|
}
|
|
4387
4388
|
const correspondPath = await getCorrespondPath(DateTime.now().toMillis());
|
|
4388
4389
|
const { data: refreshCsrfHtml } = await this.client.get(`https://www.bilibili.com/correspond/1/${correspondPath}`);
|
|
4389
|
-
const { JSDOM } = await import("jsdom");
|
|
4390
4390
|
const { document } = new JSDOM(refreshCsrfHtml).window;
|
|
4391
4391
|
const targetElement = document.getElementById("1-name");
|
|
4392
4392
|
const refresh_csrf = targetElement ? targetElement.textContent : null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-bilibili-notify",
|
|
3
3
|
"description": "Koishi bilibili notify plugin",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.1",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"blive-message-listener": "^0.5.2",
|
|
35
35
|
"cacheable-lookup": "^7.0.0",
|
|
36
36
|
"cron": "^4.3.3",
|
|
37
|
-
"jsdom": "^
|
|
37
|
+
"jsdom": "^26.1.0",
|
|
38
38
|
"luxon": "^3.8.0-alpha.1",
|
|
39
39
|
"md5": "^2.3.0",
|
|
40
40
|
"openai": "^6.8.1",
|