diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-10-04 17:04:43 -0400 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-10-04 17:04:43 -0400 |
| commit | 2d59fdd178c211cc365976f736ce42fa124d5968 (patch) | |
| tree | b24685acb807ce2411b94e83a16475395033e9a8 | |
| parent | e61c8046f460aac0b2c20344a07d11350a7a2689 (diff) | |
| download | invidious-2d59fdd178c211cc365976f736ce42fa124d5968.tar.gz invidious-2d59fdd178c211cc365976f736ce42fa124d5968.tar.bz2 invidious-2d59fdd178c211cc365976f736ce42fa124d5968.zip | |
Fix default value for empty description
| -rw-r--r-- | src/invidious/videos.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 354ab19e..a6e1aadb 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -1228,7 +1228,7 @@ def fetch_video(id, region) avg_rating = avg_rating.nan? ? 0.0 : avg_rating info["avg_rating"] = "#{avg_rating}" - description_html = html.xpath_node(%q(//p[@id="eow-description"])).try &.to_xml(options: XML::SaveOptions::NO_DECL) || "" + description_html = html.xpath_node(%q(//p[@id="eow-description"])).try &.to_xml(options: XML::SaveOptions::NO_DECL) || "<p></p>" wilson_score = ci_lower_bound(likes, likes + dislikes) published = html.xpath_node(%q(//meta[@itemprop="datePublished"])).try &.["content"] |
