[Youtube] Fix get banner url

This commit is contained in:
Xiang Rong Lin 2020-03-07 15:54:17 +01:00 committed by XiangRongLin
parent ec6b99c082
commit 68a3948af6
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ public class YoutubeMixPlaylistExtractor extends PlaylistExtractor {
@Override
public String getThumbnailUrl() throws ParsingException {
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);
} catch (Exception e) {
throw new ParsingException("Could not get playlist thumbnail", e);