mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-19 04:34:23 -05:00
Remove unnecessary XML declaration
This commit is contained in:
parent
e1c78fcbd3
commit
611555514c
@ -441,8 +441,12 @@ def replace_links(html)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
html = html.to_xml(options: XML::SaveOptions::NO_DECL)
|
html = html.xpath_node(%q(//body)).not_nil!
|
||||||
return html
|
if node = html.xpath_node(%q(./p))
|
||||||
|
html = node
|
||||||
|
end
|
||||||
|
|
||||||
|
return html.to_xml(options: XML::SaveOptions::NO_DECL)
|
||||||
end
|
end
|
||||||
|
|
||||||
def fill_links(html, scheme, host)
|
def fill_links(html, scheme, host)
|
||||||
@ -459,12 +463,10 @@ def fill_links(html, scheme, host)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if host == "www.youtube.com"
|
if host == "www.youtube.com"
|
||||||
html = html.xpath_node(%q(//body)).not_nil!.to_xml
|
html = html.xpath_node(%q(//body/p)).not_nil!
|
||||||
else
|
|
||||||
html = html.to_xml(options: XML::SaveOptions::NO_DECL)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return html
|
return html.to_xml(options: XML::SaveOptions::NO_DECL)
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_to_comment_html(content)
|
def content_to_comment_html(content)
|
||||||
|
@ -880,7 +880,7 @@ def fetch_video(id, proxies, region)
|
|||||||
info["avg_rating"] = "#{avg_rating}"
|
info["avg_rating"] = "#{avg_rating}"
|
||||||
|
|
||||||
description = html.xpath_node(%q(//p[@id="eow-description"]))
|
description = html.xpath_node(%q(//p[@id="eow-description"]))
|
||||||
description = description ? description.to_xml : ""
|
description = description ? description.to_xml(options: XML::SaveOptions::NO_DECL) : ""
|
||||||
|
|
||||||
wilson_score = ci_lower_bound(likes, likes + dislikes)
|
wilson_score = ci_lower_bound(likes, likes + dislikes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user