fixes #3771
This commit is contained in:
@@ -110,6 +110,8 @@ module Sources
|
||||
"http://fav.me/d#{$1}"
|
||||
elsif url =~ %r{\Ahttps?://(?:fc|th|pre|orig|img)\d{2}\.deviantart\.net/.+/[a-f0-9]+-d([a-z0-9]+)\.}i
|
||||
"http://fav.me/d#{$1}"
|
||||
elsif url =~ %r{\Ahttps?://www\.deviantart\.com/([^/]+)/art/}
|
||||
url
|
||||
elsif url =~ %r{deviantart\.com/art/}
|
||||
url
|
||||
else
|
||||
|
||||
@@ -7,6 +7,17 @@ module Sources
|
||||
skip "DeviantArt API keys not set" unless Danbooru.config.deviantart_client_id.present?
|
||||
end
|
||||
|
||||
context "A path-based artist url" do
|
||||
setup do
|
||||
@site = Sources::Site.new("https://www.deviantart.com/aeror404/art/Holiday-Elincia-424551484")
|
||||
@site.get
|
||||
end
|
||||
|
||||
should "work" do
|
||||
assert_equal(["http://origin-orig.deviantart.net/d533/f/2014/004/8/d/holiday_elincia_by_aeror404-d70rm0s.jpg"], @site.image_urls)
|
||||
end
|
||||
end
|
||||
|
||||
context "The source for a private DeviantArt image URL" do
|
||||
setup do
|
||||
@site = Sources::Site.new("https://pre00.deviantart.net/423b/th/pre/i/2017/281/e/0/mindflayer_girl01_by_nickbeja-dbpxdt8.png")
|
||||
|
||||
Reference in New Issue
Block a user