From 8e7dd9e97ffe1ca371d0f5e2922f1336d2b41ddd Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 7 Sep 2018 12:26:50 -0500 Subject: [PATCH] artist_url.rb: remove unnecessary deviantart profile url normalization. This is now handled in the source strategy. --- app/models/artist_url.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/artist_url.rb b/app/models/artist_url.rb index 149f70e81..9b445ecf6 100644 --- a/app/models/artist_url.rb +++ b/app/models/artist_url.rb @@ -25,9 +25,6 @@ class ArtistUrl < ApplicationRecord url = url.sub(%r!^http://blog-imgs-\d+-\w+\.fc2!, "http://blog.fc2") # url = url.sub(%r!^(http://seiga.nicovideo.jp/user/illust/\d+)\?.+!, '\1/') url = url.sub(%r!^http://pictures.hentai-foundry.com//!, "http://pictures.hentai-foundry.com/") - if url !~ %r{\Ahttps?://(?:fc|th|pre|orig|img|www)\.} - url = url.sub(%r{\Ahttps?://(.+?)\.deviantart\.com(.*)}, 'http://www.deviantart.com/\1\2') - end # the strategy won't always work for twitter because it looks for a status url = url.downcase if url =~ %r!^https?://(?:mobile\.)?twitter\.com! @@ -74,9 +71,6 @@ class ArtistUrl < ApplicationRecord url = url.gsub(%r!^http://blog-imgs-\d+-\w+\.fc2!, "http://blog*.fc2") url = url.gsub(%r!^http://img\d+\.pixiv\.net!, "http://img*.pixiv.net") url = url.gsub(%r!^http://i\d+\.pixiv\.net/img\d+!, "http://*.pixiv.net/img*") - if url !~ %r{\Ahttps?://(?:fc|th|pre|orig|img|www)\.} - url = url.sub(%r{\Ahttps?://(.+?)\.deviantart\.com(.*)}, "http://www.deviantart.com/#\1\2") - end url end