koishi-plugin-video-parser-all 1.1.6 → 1.1.7

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/lib/index.js +5 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -566,7 +566,11 @@ function apply(ctx, config) {
566
566
  try {
567
567
  const res = await ctx.http.get(api.url, {
568
568
  params: { url },
569
- timeout: config.timeout
569
+ timeout: config.timeout,
570
+ headers: {
571
+ 'User-Agent': config.userAgent || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
572
+ 'Referer': 'https://www.baidu.com/',
573
+ },
570
574
  });
571
575
  if (res.data && (res.data.code === 200 || res.data.code === 0)) {
572
576
  const parsed = parseApiResponse(res.data, config.maxDescLength);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-video-parser-all",
3
3
  "description": "Koishi 全平台视频解析插件,支持抖音/快手/B站/微博/小红书/剪映/YouTube/TikTok等20+平台",
4
- "version": "1.1.6",
4
+ "version": "1.1.7",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [