Merge pull request #4630 from nonamethanks/fix_fc2

Fix blog.fc2 urls matching wrong artists
This commit is contained in:
evazion
2020-12-05 12:53:51 -06:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -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