[Youtube] Fix get banner url
This commit is contained in:
parent
ec6b99c082
commit
68a3948af6
|
@ -60,7 +60,9 @@ public class YoutubeMixPlaylistExtractor extends PlaylistExtractor {
|
||||||
@Override
|
@Override
|
||||||
public String getThumbnailUrl() throws ParsingException {
|
public String getThumbnailUrl() throws ParsingException {
|
||||||
try {
|
try {
|
||||||
final String videoId = playlistData.getArray("contents").getObject(0).getString("videoId");
|
final String videoId = playlistData.getArray("contents").getObject(0)
|
||||||
|
.getObject("playlistPanelVideoRenderer").getString("videoId");
|
||||||
|
if (videoId == null || videoId.isEmpty()) throw new ParsingException("");
|
||||||
return getThumbnailUrlFromId(videoId);
|
return getThumbnailUrlFromId(videoId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ParsingException("Could not get playlist thumbnail", e);
|
throw new ParsingException("Could not get playlist thumbnail", e);
|
||||||
|
|
Loading…
Reference in New Issue