Permalink
Browse files

more robust handling of deviant art urls

  • Loading branch information...
Albert Yi
Albert Yi committed Jul 10, 2018
1 parent f9b6370 commit 4762de65e180443ce29dee209f0a878645ec486f
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/logical/sources/strategies/deviant_art.rb
@@ -112,8 +112,8 @@ def normalized_url
"http://fav.me/d#{$1}"
elsif url =~ %r{\Ahttps?://www\.deviantart\.com/([^/]+)/art/}
url
elsif url =~ %r{deviantart\.com/art/}
url
elsif url !~ %r{\Ahttps?://(?:fc|th|pre|orig|img|www)\.} && url =~ %r{\Ahttps?://(.+?)\.deviantart\.com/?(.*)}
"https://www.deviantart.com/#{$1}/#{$2}"
else
nil
end

0 comments on commit 4762de6

Please sign in to comment.