Fix blog.fc2 urls matching wrong artists

This commit is contained in:
nonamethanks
2020-12-04 00:17:02 +01:00
parent c6a3b11fb6
commit 32f4cb1236
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