Merge pull request #4630 from nonamethanks/fix_fc2
Fix blog.fc2 urls matching wrong artists
This commit is contained in:
@@ -44,6 +44,7 @@ module ArtistFinder
|
||||
"fantia.jp/fanclubs", # https://fantia.jp/fanclubs/1711
|
||||
"fav.me", # http://fav.me/d9y1njg
|
||||
/blog-imgs-\d+(?:-origin)?\.fc2\.com/i,
|
||||
%r{blog\.fc2\.com(/\w)+/?}i, # http://blog71.fc2.com/a/abk00/file/20080220194219.jpg
|
||||
"furaffinity.net",
|
||||
"furaffinity.net/user", # http://www.furaffinity.net/user/achthenuts
|
||||
"gelbooru.com", # http://gelbooru.com/index.php?page=account&s=profile&uname=junou
|
||||
|
||||
@@ -20,9 +20,9 @@ class ArtistUrl < ApplicationRecord
|
||||
nil
|
||||
else
|
||||
url = url.sub(%r!^https://!, "http://")
|
||||
url = url.sub(%r!^http://blog\d+\.fc2!, "http://blog.fc2")
|
||||
url = url.sub(%r!^http://blog-imgs-\d+\.fc2!, "http://blog.fc2")
|
||||
url = url.sub(%r!^http://blog-imgs-\d+-\w+\.fc2!, "http://blog.fc2")
|
||||
url = url.sub(%r!^http://blog\d*\.fc2\.com/(?:\w/){,3}(\w+)!, "http://\\1.blog.fc2.com")
|
||||
url = url.sub(%r!^http://pictures.hentai-foundry.com//!, "http://pictures.hentai-foundry.com/")
|
||||
|
||||
# the strategy won't always work for twitter because it looks for a status
|
||||
|
||||
Reference in New Issue
Block a user