[Youtube] Fix get banner url
This commit is contained in:
parent
ec6b99c082
commit
68a3948af6
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue