diff --git a/app/logical/sources/strategies/deviant_art.rb b/app/logical/sources/strategies/deviant_art.rb index 11fa8a5c3..060bc8a6f 100644 --- a/app/logical/sources/strategies/deviant_art.rb +++ b/app/logical/sources/strategies/deviant_art.rb @@ -18,17 +18,6 @@ module Sources end def image_urls - # normalize thumbnails - if url =~ %r{^(https?://(?:fc|th)\d{2}\.deviantart\.net/.+?/)200H/} - match = $1 - return [url.sub(match + "200H/", match)] - end - - if url =~ %r{^(https?://(?:fc|th)\d{2}\.deviantart\.net/.+?/)PRE/} - match = $1 - return [url.sub(match + "PRE/", match)] - end - # return direct links if url =~ ATTRIBUTED_ASSET || url =~ ASSET return [url] diff --git a/test/unit/sources/deviantart_test.rb b/test/unit/sources/deviantart_test.rb index 538495f87..c54e72f3d 100644 --- a/test/unit/sources/deviantart_test.rb +++ b/test/unit/sources/deviantart_test.rb @@ -56,6 +56,13 @@ module Sources end end + context "The source for a th00.deviantart.net/*/PRE/* thumbnail url" do + should "return the full size image url" do + @site = Sources::Strategies.find("http://th00.deviantart.net/fs71/PRE/f/2014/065/3/b/goruto_by_xyelkiltrox-d797tit.png") + assert_equal("http://origin-orig.deviantart.net/0f1e/f/2014/065/3/b/goruto_by_xyelkiltrox-d797tit.png", @site.image_url) + end + end + context "The source for an DeviantArt artwork page" do setup do @site = Sources::Strategies.find("http://noizave.deviantart.com/art/test-post-please-ignore-685436408")