diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 1df4ffc4..6a0c6c38 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -119,13 +119,18 @@ end def fetch_playlist(plid) client = make_client(YT_URL) response = client.get("/playlist?list=#{plid}&disable_polymer=1") - document = XML.parse_html(response.body) + body = response.body.gsub(<<-END_BUTTON + + END_BUTTON + , "") + document = XML.parse_html(body) title = document.xpath_node(%q(//h1[@class="pl-header-title"])).not_nil!.content title = title.strip(" \n") description_html = document.xpath_node(%q(//span[@class="pl-header-description-text"]/div/div[1])) - description, description_html = html_to_content(description_html) + description_html, description = html_to_content(description_html) anchor = document.xpath_node(%q(//ul[@class="pl-header-details"])).not_nil! author = anchor.xpath_node(%q(.//li[1]/a)).not_nil!.content diff --git a/src/invidious/views/playlist.ecr b/src/invidious/views/playlist.ecr index f3d08ce9..4e93fc6f 100644 --- a/src/invidious/views/playlist.ecr +++ b/src/invidious/views/playlist.ecr @@ -16,7 +16,7 @@
<%= playlist.description %>
+<%= playlist.description_html %>