Twitter ripper no longer errors out on some videos
This commit is contained in:
parent
c4d6f6d9fd
commit
21a1af7d31
@ -194,11 +194,15 @@ public class TwitterRipper extends AlbumRipper {
|
|||||||
// Loop over all the video options and find the biggest video
|
// Loop over all the video options and find the biggest video
|
||||||
for (int j = 0; j < medias.length(); j++) {
|
for (int j = 0; j < medias.length(); j++) {
|
||||||
JSONObject variant = (JSONObject) variants.get(i);
|
JSONObject variant = (JSONObject) variants.get(i);
|
||||||
|
LOGGER.info(variant);
|
||||||
|
// If the video doesn't have a bitrate it's a m3u8 file we can't download
|
||||||
|
if (variant.has("bitrate")) {
|
||||||
if (variant.getInt("bitrate") > largestBitrate) {
|
if (variant.getInt("bitrate") > largestBitrate) {
|
||||||
largestBitrate = variant.getInt("bitrate");
|
largestBitrate = variant.getInt("bitrate");
|
||||||
urlToDownload = variant.getString("url");
|
urlToDownload = variant.getString("url");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (urlToDownload != null) {
|
if (urlToDownload != null) {
|
||||||
addURLToDownload(new URL(urlToDownload), getPrefix(downloadUrls));
|
addURLToDownload(new URL(urlToDownload), getPrefix(downloadUrls));
|
||||||
downloadUrls++;
|
downloadUrls++;
|
||||||
|
Loading…
Reference in New Issue
Block a user