diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-06 22:56:21 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-06 22:56:21 -0500 |
| commit | 8b572d268df20bada27e0d82c0d2b361ac7c6d94 (patch) | |
| tree | 2a8caf51777a0c3d8dcd8a31981eb9298c688943 | |
| parent | 3c359df22edd34a9870c9021271f02b2a1fd2618 (diff) | |
| download | invidious-8b572d268df20bada27e0d82c0d2b361ac7c6d94.tar.gz invidious-8b572d268df20bada27e0d82c0d2b361ac7c6d94.tar.bz2 invidious-8b572d268df20bada27e0d82c0d2b361ac7c6d94.zip | |
Add fix for playlists in search results
| -rw-r--r-- | src/invidious/search.cr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/invidious/search.cr b/src/invidious/search.cr index a2768b86..e608eb83 100644 --- a/src/invidious/search.cr +++ b/src/invidious/search.cr @@ -43,6 +43,11 @@ def search(query, page = 1, search_params = build_search_params(content_type: "v author_url = anchor["href"] 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)) if metadata.size == 0 next |
