2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-31 22:35:50 +00:00

Merge pull request #185 from Stypox/search-error-fix

Fix casual search error when playlists are in results
This commit is contained in:
Christian Schabesberger
2019-08-18 00:37:59 +02:00
committed by GitHub

View File

@@ -49,10 +49,11 @@ public class YoutubePlaylistInfoItemExtractor implements PlaylistInfoItemExtract
@Override
public String getUrl() throws ParsingException {
try {
final Element div = el.select("div[class=\"yt-lockup-meta\"]").first();
final Element a = el.select("div[class=\"yt-lockup-meta\"]")
.select("ul[class=\"yt-lockup-meta-info\"]")
.select("li").select("a").first();
if(div != null) {
final Element a = div.select("a").first();
if(a != null) {
return a.attr("abs:href");
}