Substitute redirect links in video description

このコミットが含まれているのは:
Omar Roth 2018-04-07 10:13:52 -05:00
コミット 1a458ee94c
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -448,7 +448,7 @@ def add_alt_links(html)
anchor = anchor.xpath_node("//a").not_nil!
url = URI.parse(HTML.unescape(anchor["href"]))
if ["www.youtube.com", "m.youtube.com"].includes?(url.host) && url.path == "/watch"
if ["www.youtube.com", "m.youtube.com"].includes?(url.host) && url.path == "/watch" || url.path == "/redirect"
alt_link = <<-END_HTML
<a href="#{url.full_path}">
<i class="fa fa-link" aria-hidden="true"></i>