mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-14 10:14:42 -05:00
Add fix for playlists in search results
This commit is contained in:
parent
3c359df22e
commit
8b572d268d
@ -43,6 +43,11 @@ def search(query, page = 1, search_params = build_search_params(content_type: "v
|
|||||||
author_url = anchor["href"]
|
author_url = anchor["href"]
|
||||||
ucid = author_url.split("/")[-1]
|
ucid = author_url.split("/")[-1]
|
||||||
|
|
||||||
|
# Skip playlists
|
||||||
|
if node.xpath_node(%q(.//ol[contains(@class, "yt-lockup-playlist-items")]))
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
metadata = node.xpath_nodes(%q(.//div[contains(@class,"yt-lockup-meta")]/ul/li))
|
metadata = node.xpath_nodes(%q(.//div[contains(@class,"yt-lockup-meta")]/ul/li))
|
||||||
if metadata.size == 0
|
if metadata.size == 0
|
||||||
next
|
next
|
||||||
|
Loading…
Reference in New Issue
Block a user