本文整理了Java中at.huber.youtubeExtractor.YtFile.getUrl()
方法的一些代码示例,展示了YtFile.getUrl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YtFile.getUrl()
方法的具体详情如下:
包路径:at.huber.youtubeExtractor.YtFile
类名称:YtFile
方法名:getUrl
[英]The url to download the file.
[中]下载文件的url。
代码示例来源:origin: HaarigerHarald/android-youtubeExtractor
@Override
public void onClick(View v) {
String filename;
if (videoTitle.length() > 55) {
filename = videoTitle.substring(0, 55) + "." + ytfile.getFormat().getExt();
} else {
filename = videoTitle + "." + ytfile.getFormat().getExt();
}
filename = filename.replaceAll("[\\\\><\"|*?%:#/]", "");
downloadFromUrl(ytfile.getUrl(), videoTitle, filename);
finish();
}
});
代码示例来源:origin: HaarigerHarald/android-youtubeExtractor
@Override
public void onClick(View v) {
String filename;
if (videoTitle.length() > 55) {
filename = videoTitle.substring(0, 55);
} else {
filename = videoTitle;
}
filename = filename.replaceAll("[\\\\><\"|*?%:#/]", "");
filename += (ytFrVideo.height == -1) ? "" : "-" + ytFrVideo.height + "p";
String downloadIds = "";
boolean hideAudioDownloadNotification = false;
if (ytFrVideo.videoFile != null) {
downloadIds += downloadFromUrl(ytFrVideo.videoFile.getUrl(), videoTitle,
filename + "." + ytFrVideo.videoFile.getFormat().getExt(), false);
downloadIds += "-";
hideAudioDownloadNotification = true;
}
if (ytFrVideo.audioFile != null) {
downloadIds += downloadFromUrl(ytFrVideo.audioFile.getUrl(), videoTitle,
filename + "." + ytFrVideo.audioFile.getFormat().getExt(), hideAudioDownloadNotification);
}
if (ytFrVideo.audioFile != null)
cacheDownloadIds(downloadIds);
finish();
}
});
代码示例来源:origin: Ashish-Bansal/OneTapVideoDownload
@Override
public void onExtractionComplete(SparseArray<YtFile> ytFiles, VideoMeta vMeta) {
if (ytFiles != null) {
YoutubeVideo video = new YoutubeVideo(vMeta.getTitle(), vMeta.getVideoId());
for(Pair p : YoutubeVideo.itagQualityMapping) {
YtFile videoFormat = ytFiles.get(Integer.parseInt(p.first.toString()));
if (videoFormat == null) {
continue;
}
video.addFormat(videoFormat.getUrl(), Integer.parseInt(p.first.toString()));
}
try {
invokable.invoke(video);
} catch (java.lang.Exception e) {
FirebaseCrash.report(e);
e.printStackTrace();
}
} else {
Log.e(TAG, "URLs are empty");
}
}
};
代码示例来源:origin: HaarigerHarald/android-youtubeExtractor
dashMpdUrl = dashMpdUrl.replace("/s/" + encSignatures.get(key), "/signature/" + sigs[i]);
} else {
String url = ytFiles.get(key).getUrl();
url += "&signature=" + sigs[i];
YtFile newFile = new YtFile(FORMAT_MAP.get(key), url);
内容来源于网络,如有侵权,请联系作者删除!