Skip to content

Commit

Permalink
Merge pull request #185 from Stypox/search-error-fix
Browse files Browse the repository at this point in the history
Fix casual search error when playlists are in results
  • Loading branch information
theScrabi authored Aug 17, 2019
2 parents 5f65788 + d4e975e commit a133042
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ public String getName() throws ParsingException {
@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");
}

Expand Down

0 comments on commit a133042

Please sign in to comment.