diff --git a/app/logical/sources/strategies/weibo.rb b/app/logical/sources/strategies/weibo.rb index c1281a894..aa6942aed 100644 --- a/app/logical/sources/strategies/weibo.rb +++ b/app/logical/sources/strategies/weibo.rb @@ -30,6 +30,8 @@ module Sources end [largest_video] end + else + [url] end end diff --git a/test/unit/sources/weibo_test.rb b/test/unit/sources/weibo_test.rb index ae2db5304..43a385a38 100644 --- a/test/unit/sources/weibo_test.rb +++ b/test/unit/sources/weibo_test.rb @@ -86,6 +86,13 @@ module Sources end end + context "A deleted url" do + should "not raise errors" do + url = "https://weibo.com/5265069929/LiLnMENgs" + assert_nothing_raised { Sources::Strategies.find(url).to_h } + end + end + context "normalizing for source" do should "normalize correctly" do source1 = "https://www.weibo.com/3150932560/H4cFbeKKA?from=page_1005053150932560_profile&wvr=6&mod=weibotime"