mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: V1.6.6 修复downloadVideo
函数出现缺陷问题
1. 修复`downloadVideo`函数在国内服务器的缺陷 2. 修复YouTube、tiktok在国内服务器无法使用问题
This commit is contained in:
parent
c4eaf682c2
commit
f9412d3c1d
@ -731,7 +731,7 @@ export class tools extends plugin {
|
||||
if (url && (url.endsWith(".jpg") || url.endsWith(".png"))) {
|
||||
e.reply(segment.image(url));
|
||||
} else {
|
||||
this.downloadVideo(url).then(path => {
|
||||
this.downloadVideo(url, !isOversea).then(path => {
|
||||
e.reply(segment.video(path + "/temp.mp4"));
|
||||
});
|
||||
}
|
||||
@ -1189,7 +1189,7 @@ export class tools extends plugin {
|
||||
if (formats.length > 0) {
|
||||
// 大概率是720p
|
||||
const videoUrl = formats?.[formats.length - 1].url;
|
||||
this.downloadVideo(videoUrl).then(path => {
|
||||
this.downloadVideo(videoUrl, !isOversea).then(path => {
|
||||
e.reply(segment.video(path + "/temp.mp4"));
|
||||
});
|
||||
}
|
||||
@ -1549,7 +1549,7 @@ export class tools extends plugin {
|
||||
httpAgent: tunnel.httpOverHttp({
|
||||
proxy: { host: this.proxyAddr, port: this.proxyPort },
|
||||
}),
|
||||
httpsAgent: tunnel.httpOverHttp({
|
||||
httpsAgent: tunnel.httpsOverHttp({
|
||||
proxy: { host: this.proxyAddr, port: this.proxyPort },
|
||||
}),
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user