koishi-plugin-nitter 0.0.2 → 0.0.3
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.js +5 -1
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -300,7 +300,11 @@ async function renderTweetScreenshot(ctx, tweetId, config) {
|
|
|
300
300
|
if (!element2) throw new Error("Rate Limited");
|
|
301
301
|
}, 2e3);
|
|
302
302
|
if (config.enableTranslate) {
|
|
303
|
-
|
|
303
|
+
try {
|
|
304
|
+
await addTranslate(page, ".main-thread .tweet-content, .main-thread .quote-text");
|
|
305
|
+
} catch (e) {
|
|
306
|
+
ctx.logger("nitter").info("翻译失败", e);
|
|
307
|
+
}
|
|
304
308
|
}
|
|
305
309
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
306
310
|
await page.evaluate(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-nitter",
|
|
3
3
|
"description": "使用Rettiwt-API订阅推文,并使用nitter渲染",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@satorijs/element": "^3.1.8",
|
|
19
19
|
"axios": "^1.12.2",
|
|
20
|
+
"https-proxy-agent": "^7.0.6",
|
|
20
21
|
"koishi": "^4.18.9",
|
|
21
22
|
"koishi-plugin-subscription": "^0.0.1",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"node-cron": "^4.2.1"
|
|
23
|
+
"node-cron": "^4.2.1",
|
|
24
|
+
"rettiwt-api": "^6.0.6"
|
|
25
25
|
}
|
|
26
26
|
}
|