fixes #2319: Artist search - NicoSeiga - not finding artist entries from partial URLs

This commit is contained in:
r888888888
2015-08-07 15:09:30 -07:00
parent 5bc0eea161
commit a9502c0dc2
3 changed files with 16 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ class ArtistUrl < ActiveRecord::Base
url = url.gsub(/^http:\/\/blog\d+\.fc2/, "http://blog.fc2")
url = url.gsub(/^http:\/\/blog-imgs-\d+\.fc2/, "http://blog.fc2")
url = url.gsub(/^http:\/\/blog-imgs-\d+-\w+\.fc2/, "http://blog.fc2")
url = url.sub(%r!(http://seiga.nicovideo.jp/user/illust/\d+)\?.+!, '\1')
begin
url = Sources::Site.new(url).normalize_for_artist_finder!
rescue PixivApiClient::Error