Merge pull request #5040 from nonamethanks/fix-weibo-404

Weibo: fix exception for deleted url
This commit is contained in:
evazion
2022-03-08 23:08:37 -06:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ module Sources
end
[largest_video]
end
else
[url]
end
end

View File

@@ -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"