我想从谷歌硬盘下载视频。 我收到了谷歌驱动器(redirector.google.com)的视频链接
重定向链接重定向谷歌中的其他链接。像3-7--n-y-mm.googlevideo.com。
我正在使用来自nodejs的download-from-url包下载视频。
我收到了这个错误。我该怎么办?
注意:如果我访问谷歌浏览器中的重定向器链接,它会将我重定向到真正的链接。
此处代码:
错误和代码文本。 错误:
downloading...
STARTO
https://redirector.googlevideo.com/videoplayback?id=50a591ac19de97bd&itag=22&source=webdrive&requiressl=yes&ttl=transient&mm=31&mn=sn-5hne6n7e&ms=au&mv=m&nh=IgpwcjA0LmFtczE2KgkxMjcuMC4wLjE&pl=22&mime=video/mp4&lmt=1485237105908527&mt=1485276323&ip=46.166.148.148&ipbits=8&expire=1485290986&sparams=ip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%2Crequiressl%2Cttl%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cmime%2Clmt&signature=075A6977C5DA2232BDF6325E2B7DE659DF910283.97EFF36FEF6ED1CDD6FFDE5FB81E576C6F8C3564&key=ck2&app=explorer
C:\Users\Administrator\Desktop\diziBot\diziBot\exp.js:77
throw err;
^
Error: Server responded with error code : 403
代码:
var url = "https://redirector.googlevideo.com/videoplayback?id=50a591ac19de97bd&itag=22&source=webdrive&requiressl=yes&ttl=transient&mm=31&mn=sn-5hne6n7e&ms=au&mv=m&nh=IgpwcjA0LmFtczE2KgkxMjcuMC4wLjE&pl=22&mime=video/mp4&lmt=1485237105908527&mt=1485276323&ip=46.166.148.148&ipbits=8&expire=1485290986&sparams=ip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%2Crequiressl%2Cttl%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cmime%2Clmt&signature=075A6977C5DA2232BDF6325E2B7DE659DF910283.97EFF36FEF6ED1CDD6FFDE5FB81E576C6F8C3564&key=ck2&app=explorer";
var request = http.get(url, function(response) {
console.log("STARTO");
console.log(response.responseUrl);
const downloader = require('download-from-url');
downloader(response.responseUrl, function(err, infos, headers) {
if(err)
throw err;
console.log("Finish");
uploadGoogle(dizi_adi_up);
});
});