Skip to content

Commit 68a3948

Browse files
committed
[Youtube] Fix get banner url
1 parent ec6b99c commit 68a3948

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeMixPlaylistExtractor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public String getName() throws ParsingException {
6060
@Override
6161
public String getThumbnailUrl() throws ParsingException {
6262
try {
63-
final String videoId = playlistData.getArray("contents").getObject(0).getString("videoId");
63+
final String videoId = playlistData.getArray("contents").getObject(0)
64+
.getObject("playlistPanelVideoRenderer").getString("videoId");
65+
if (videoId == null || videoId.isEmpty()) throw new ParsingException("");
6466
return getThumbnailUrlFromId(videoId);
6567
} catch (Exception e) {
6668
throw new ParsingException("Could not get playlist thumbnail", e);

0 commit comments

Comments
 (0)