deviantart: fix artist finder for artist names with underscores.

Fix the artist finder for urls like this:

  https://orig00.deviantart.net/4274/f/2010/230/8/a/pkmn_king_and_queen_by_mikoto_chan.jpg

that don't contain a deviantart id but do contain the artist name.
This commit is contained in:
evazion
2018-09-07 12:23:48 -05:00
parent 610391205f
commit a67edb8783
2 changed files with 11 additions and 1 deletions

View File

@@ -182,7 +182,7 @@ module Sources
def self.artist_name_from_url(url)
if url =~ ASSET || url =~ PATH_ART || url =~ PATH_PROFILE
$~[:artist]
$~[:artist].try(:dasherize)
elsif url !~ RESERVED_SUBDOMAINS && (url =~ SUBDOMAIN_ART || url =~ SUBDOMAIN_PROFILE)
$~[:artist]
else