sources: factor out Source::URL::Fanbox.
Also fix it so that we grab the full image for cover URLs like this: * Sample: https://pixiv.pximg.net/c/1620x580_90_a2_g5/fanbox/public/images/creator/1566167/cover/QqxYtuWdy4XWQx1ZLIqr4wvA.jpeg * Full: https://pixiv.pximg.net/fanbox/public/images/creator/1566167/cover/QqxYtuWdy4XWQx1ZLIqr4wvA.jpeg
This commit is contained in:
@@ -111,7 +111,7 @@ module Sources
|
||||
should "still work" do
|
||||
post = Sources::Strategies.find("https://pixiv.pximg.net/c/1620x580_90_a2_g5/fanbox/public/images/creator/1566167/cover/QqxYtuWdy4XWQx1ZLIqr4wvA.jpeg")
|
||||
assert_nothing_raised { post.to_h }
|
||||
assert_downloaded(366_291, post.image_url)
|
||||
assert_downloaded(750_484, post.image_url)
|
||||
assert_equal("https://omu001.fanbox.cc", post.profile_url)
|
||||
assert_equal(post.profile_url, post.canonical_url)
|
||||
artist = FactoryBot.create(:artist, name: "omu", url_string: "https://omu001.fanbox.cc")
|
||||
|
||||
Reference in New Issue
Block a user