Fix #3695: Bookmarklet breaks on pixiv fanbox direct image links.

This commit is contained in:
evazion
2018-05-05 12:21:11 -05:00
parent 59ab9820b0
commit 181a906766
2 changed files with 11 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ module Downloads
end
return [url, headers, data]
rescue PixivApiClient::BadIDError
rescue PixivApiClient::BadIDError, Sources::Site::NoStrategyError
return [url, headers, data]
end

View File

@@ -169,6 +169,16 @@ module Downloads
assert_downloaded(@file_size, @file_url)
end
end
context "downloading a pixiv fanbox image" do
should "work" do
@file_url = "https://fanbox.pixiv.net/images/post/31757/w/1200/0CdXtgr4al3t43gQG4NZLnpQ.jpeg"
@file_size = 200_239
assert_not_rewritten(@file_url)
assert_downloaded(@file_size, @file_url)
end
end
end
end
end