From 03a97d296269500deb09e81a328924e465c5ebc6 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 21 Aug 2018 00:07:58 -0500 Subject: [PATCH] Post#normalized_source: add toranoana.jp normalization. --- app/models/post.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index a3ad962e4..100562244 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -532,6 +532,13 @@ class Post < ApplicationRecord when %r{\Ahttps?://\w+\.photozou\.jp/pub/\d+/(?\d+)/photo/(?\d+)_.*$}i "https://photozou.jp/photo/show/#{$~[:artist_id]}/#{$~[:photo_id]}" + # http://img.toranoana.jp/popup_img/04/0030/09/76/040030097695-2p.jpg + # http://img.toranoana.jp/popup_img18/04/0010/22/87/040010228714-1p.jpg + # http://img.toranoana.jp/popup_blimg/04/0030/08/30/040030083068-1p.jpg + # https://ecdnimg.toranoana.jp/ec/img/04/0030/65/34/040030653417-6p.jpg + when %r{\Ahttps?://(\w+\.)?toranoana\.jp/(?:popup_(?:bl)?img\d*|ec/img)/\d{2}/\d{4}/\d{2}/\d{2}/(?\d+)}i + "https://ec.toranoana.jp/tora_r/ec/item/#{$~[:work_id]}/" + else source end