使用VGet下载YouTube视频时出错

时间:2019-07-17 17:58:31

标签: java youtube

我已经使用VGet很长时间了,没有任何问题。 从大约2周前开始,我开始出现此错误:

com.github.axet.wget.info.ex.DownloadError: com.github.axet.wget.info.ex.DownloadIOCodeError 403
    at com.github.axet.vget.VGet.retry(VGet.java:181) ~[vget-1.2.6.jar:?]
    at com.github.axet.vget.VGet.extract(VGet.java:430) ~[vget-1.2.6.jar:?]
    at com.github.axet.vget.VGet.download(VGet.java:499) ~[vget-1.2.6.jar:?]
    at com.github.axet.vget.VGet.download(VGet.java:101) ~[vget-1.2.6.jar:?]
    at com.autosonvideo.app.aovfeed.updater.YouTubeVideoUpdater.downloadVideo(YouTubeVideoUpdater.java:229) [classes/:?]
    at com.autosonvideo.app.aovfeed.updater.YouTubeVideoUpdater.handleFile(YouTubeVideoUpdater.java:113) [classes/:?]
    at com.autosonvideo.app.aovfeed.updater.YouTubeVideoUpdater.handleVideos(YouTubeVideoUpdater.java:79) [classes/:?]
    at com.autosonvideo.app.aovfeed.updater.YouTubeVideoUpdater.access$000(YouTubeVideoUpdater.java:39) [classes/:?]
    at com.autosonvideo.app.aovfeed.updater.YouTubeVideoUpdater$1.run(YouTubeVideoUpdater.java:57) [classes/:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
Caused by: com.github.axet.wget.info.ex.DownloadIOCodeError
    at com.github.axet.wget.RetryWrap.check(RetryWrap.java:199) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.info.URLInfo.extractNormal(URLInfo.java:296) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.info.URLInfo$2.download(URLInfo.java:168) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.info.URLInfo$2.download(URLInfo.java:156) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.info.URLInfo$2.download(URLInfo.java:136) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.RetryWrap.run(RetryWrap.java:88) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.RetryWrap.wrap(RetryWrap.java:145) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.info.URLInfo.extract(URLInfo.java:136) ~[wget-1.4.3.jar:?]
    at com.github.axet.wget.info.DownloadInfo.extract(DownloadInfo.java:293) ~[wget-1.4.3.jar:?]
    at com.github.axet.vget.info.VGetParser.info(VGetParser.java:23) ~[vget-1.2.6.jar:?]
    at com.github.axet.vget.VGet.extract(VGet.java:415) ~[vget-1.2.6.jar:?]

我正在使用以下代码:

String url = getYouTubeUrl();
VGet v = new VGet(new URL(url), new File(path));
File output = new File(getVideoId() + ".mp4");
if (output.exists())
   output.delete();
output.createNewFile();
v.setTarget(output);
v.download();

知道发生了什么以及如何解决?

0 个答案:

没有答案