问题描述
我正在尝试使用 com.github.axet.vget
库下载 YouTube 视频。我使用我的 IntelliJ Idea IDE 导入了这个库。使用简单的代码示例时,出现以下错误:
Exception in thread "main" com.github.axet.wget.info.ex.DownloadError: com.github.axet.wget.info.ex.DownloadRetry: empty video download list,wait until youtube will process the video
at com.github.axet.vget.VGet.retry(VGet.java:181)
at com.github.axet.vget.VGet.extract(VGet.java:421)
at com.github.axet.vget.VGet.download(VGet.java:499)
at com.github.axet.vget.VGet.download(VGet.java:101)
at com.youtube.converter.Main.main(Main.java:32)
Caused by: com.github.axet.wget.info.ex.DownloadRetry: empty video download list,wait until youtube will process the video
at com.github.axet.vget.vhs.YouTubeParser.extract(YouTubeParser.java:855)
at com.github.axet.vget.info.VGetParser.info(VGetParser.java:17)
at com.github.axet.vget.VGet.extract(VGet.java:415)
... 3 more
我在不同的机器/计算机上尝试了我的脚本,并使用了许多不同的视频链接(URL)。但是,它们都在运行时返回了错误。
我使用的是 VGet
版本 1.2.6,但我也尝试了 1.2.5 和 1.2.0。
import com.github.axet.vget.VGet;
import java.io.File;
import java.net.URL;
import java.net.MalformedURLException;
public class Main {
public static void main(String[] args) throws MalformedURLException {
String url = "https://www.youtube.com/watch?v=9FWIG_c6PfI";
String urlPlaylistVideo = "https://www.youtube.com/watch?v=l0U7SxXHkPY&list=PLbpi6ZahtOH7eFIp5Cc15AnhiIdkjgmdC&index=1";
String path = "C:\\Users\\Username\\OutputFolder";
VGet vg = new VGet(new URL(url),new File(path));
vg.download();
}
}
此 Java 脚本中的 URL 是示例。注意到我尝试了很多不同的视频链接(网址)。
我在 StackOverflow 和 GitLab 发现了一些类似的问题,但都没有答案。 关于 VGet 的信息:https://github.com/laserjim/vget。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)