Skip to content

Commit d4e975e

Browse files
committed
Fix search error with some playlists
Somtimes there were two divs with class "yt-lockup-meta", so the extractor couldn't get the correct one.
1 parent 5f65788 commit d4e975e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ public String getName() throws ParsingException {
4949
@Override
5050
public String getUrl() throws ParsingException {
5151
try {
52-
final Element div = el.select("div[class=\"yt-lockup-meta\"]").first();
52+
final Element a = el.select("div[class=\"yt-lockup-meta\"]")
53+
.select("ul[class=\"yt-lockup-meta-info\"]")
54+
.select("li").select("a").first();
5355

54-
if(div != null) {
55-
final Element a = div.select("a").first();
56+
if(a != null) {
5657
return a.attr("abs:href");
5758
}
5859

0 commit comments

Comments
 (0)