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.
- package/lib/index.js +5 -1
- 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