koishi-plugin-meinv 1.0.13 → 1.0.16

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +3 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-meinv",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "main": "src/index.js",
5
5
  "files": [
6
6
  "src"
package/src/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const { Context } = require('koishi')
2
- const axios = require('axios')
3
2
 
4
3
  exports.name = 'meinv'
5
4
  exports.using = ['logger']
@@ -12,22 +11,10 @@ exports.apply = (ctx) => {
12
11
  await session.send('请稍等 视频就在来的路上了......\nby.pldduck')
13
12
 
14
13
  try {
15
- // 第二步:请求 API
16
- const res = await axios.get('https://www.tmini.net/api/meinv?mp4=json', {
17
- timeout: 15000,
18
- headers: {
19
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
20
- 'Referer': 'https://www.tmini.net/'
21
- }
22
- })
23
-
24
- // 第三步:解析视频链接
25
- const videoUrl = res.data?.data?.link || res.data?.url
26
- if (!videoUrl) {
27
- return '❌ 未获取到有效视频链接。'
28
- }
14
+ // 第二步:直接使用视频流接口
15
+ const videoUrl = 'https://www.tmini.net/api/meinv'
29
16
 
30
- // 第四步:直接发送视频 URL(Koishi 4.x 支持)
17
+ // 第三步:发送视频(Koishi 4.x 支持)
31
18
  await session.send({
32
19
  type: 'file',
33
20
  url: videoUrl