Fix #3823: Add Photozou source normalization.

This commit is contained in:
evazion
2018-08-18 23:23:48 -05:00
parent 3ae913a707
commit 4eead40f4d

View File

@@ -521,6 +521,11 @@ class Post < ApplicationRecord
source
end
# http://art59.photozou.jp/pub/212/1986212/photo/118493247_org.v1534644005.jpg
# http://kura3.photozou.jp/pub/794/1481794/photo/161537258_org.v1364829097.jpg
when %r{\Ahttps?://\w+\.photozou\.jp/pub/\d+/(?<artist_id>\d+)/photo/(?<photo_id>\d+)_.*$}i
"https://photozou.jp/photo/show/#{$~[:artist_id]}/#{$~[:photo_id]}"
else
source
end