From b8fe82a7f7d05f4a2af0d7445e2633dea5169395 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 3 Mar 2018 15:27:14 -0600 Subject: [PATCH] Substitute youtube links in description for local links --- src/helpers.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/helpers.cr b/src/helpers.cr index eeda239a..45204132 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -133,6 +133,7 @@ def fetch_video(id, client) description = html.xpath_node(%q(//p[@id="eow-description"])) description = description ? description.to_xml : "" + description = description.gsub(/(https:\/\/)|(http:\/\/)?(www\.)?(youtube\.com)/, "") wilson_score = ci_lower_bound(likes, likes + dislikes)