posts: drop img.ly source normalization.

There are only two posts from this site and the site itself is defunct:

* https://danbooru.donmai.us/posts/1561685
* https://danbooru.donmai.us/posts/1412508
* https://img.ly/ofxl
This commit is contained in:
evazion
2019-08-07 22:11:07 -05:00
parent c7cd43d30e
commit 5231371100
3 changed files with 0 additions and 9 deletions

View File

@@ -19,7 +19,6 @@ gem 'statistics2'
gem 'capistrano', '~> 3.10'
gem 'capistrano-rails'
gem 'capistrano-rbenv'
gem 'radix62', '~> 1.0.1'
gem 'streamio-ffmpeg'
gem 'rubyzip', :require => "zip"
gem 'stripe'

View File

@@ -281,7 +281,6 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
radix62 (1.0.1)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
@@ -464,7 +463,6 @@ DEPENDENCIES
pg
pry-byebug
ptools
radix62 (~> 1.0.1)
rails (~> 5.2)
rakismet
recaptcha

View File

@@ -449,12 +449,6 @@ class Post < ApplicationRecord
when %r{\Ahttp://(?:(?:(?:img\d?|cdn)\.)?rule34\.xxx|img\.booru\.org/(?:rule34|r34))(?:/(?:img/rule34|r34))?/{1,2}images/\d+/(?:[a-f0-9]{32}|[a-f0-9]{40})\.}i
"https://rule34.xxx/index.php?page=post&s=list&md5=#{md5}"
when %r{\Ahttps?://(?:s3\.amazonaws\.com/imgly_production|img\.ly/system/uploads)/((?:\d{3}/){3}|\d+/)}i
imgly_id = $1
imgly_id = imgly_id.gsub(/[^0-9]/, '')
base_62 = imgly_id.to_i.encode62
"https://img.ly/#{base_62}"
when %r{(\Ahttp://.+)/diarypro/d(?:ata/upfile/|iary\.cgi\?mode=image&upfile=)(\d+)}i
base_url = $1
entry_no = $2