如何获取视频信息并下载速度vget API

时间:2019-07-10 08:34:36

标签: java swing awt

我正在设置Jtable,其中包括通过vget api下载youtube视频并获取视频信息的进度 显示在类似于IDM

的表上
public void function(String url) {
    this.url = url;
    try {
        File downloadDir = new File("Downloads");
        downloadDir.mkdir();
        this.path = downloadDir.getAbsolutePath();
        VGet vGet = new VGet(new URL(url), new File(path));
        System.out.println("\n[*] Please wait ....\n" +
                "[*] Downloading files at path : "
                + this.path + "\n");

        vGet.download();
        // List the Files :
        try {
            fileList(downloadDir);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } catch (MalformedURLException mue) {
        mue.printStackTrace();
    }
}

0 个答案:

没有答案