mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Improve playlist description extractor
This commit is contained in:
parent
cc00beb1db
commit
4ae57cb475
1 changed files with 1 additions and 4 deletions
|
@ -168,10 +168,7 @@ def fetch_playlist(plid, locale)
|
||||||
raise translate(locale, "Invalid playlist.")
|
raise translate(locale, "Invalid playlist.")
|
||||||
end
|
end
|
||||||
|
|
||||||
body = response.body.gsub(%(
|
body = response.body.gsub(/<button[^>]+><span[^>]+>\s*less\s*<img[^>]+>\n<\/span><\/button>/, "")
|
||||||
<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-link yt-uix-expander-head playlist-description-expander yt-uix-inlineedit-ignore-edit" type="button" onclick=";return false;"><span class="yt-uix-button-content"> less <img alt="" src="/yts/img/pixel-vfl3z5WfW.gif">
|
|
||||||
</span></button>
|
|
||||||
), "")
|
|
||||||
document = XML.parse_html(body)
|
document = XML.parse_html(body)
|
||||||
|
|
||||||
title = document.xpath_node(%q(//h1[@class="pl-header-title"]))
|
title = document.xpath_node(%q(//h1[@class="pl-header-title"]))
|
||||||
|
|
Loading…
Reference in a new issue