Skip to content

Commit

Permalink
more robust handling of deviant art urls
Browse files Browse the repository at this point in the history
  • Loading branch information
albertc5 committed Jul 10, 2018
1 parent f9b6370 commit 4762de6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/logical/sources/strategies/deviant_art.rb
Expand Up @@ -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
Expand Down

0 comments on commit 4762de6

Please sign in to comment.