From 4eead40f4d66dda88eb73390899e02156c8f78f8 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 18 Aug 2018 23:23:48 -0500 Subject: [PATCH] Fix #3823: Add Photozou source normalization. --- app/models/post.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index acbcdac99..7a9d293c2 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -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+/(?\d+)/photo/(?\d+)_.*$}i + "https://photozou.jp/photo/show/#{$~[:artist_id]}/#{$~[:photo_id]}" + else source end