sources: factor out Source::URL::HentaiFoundry.

Add support for these URL types:

* http://pictures.hentai-foundry.com//s/soranamae/363663.jpg
* http://www.hentai-foundry.com/piccies/d/dmitrys/1183.jpg
* http://www.hentai-foundry.com/pic-149160.php
* http://www.hentai-foundry.com/user-RockCandy.php
* http://www.hentai-foundry.com/profile-sawao.php

These URL types are obsolete, but still present in some old posts.
This commit is contained in:
evazion
2022-02-25 19:09:29 -06:00
parent 5837b614d4
commit 64472a7b7e
4 changed files with 111 additions and 33 deletions

View File

@@ -19,6 +19,7 @@ module Source
class URL < Danbooru::URL
SUBCLASSES = [
Source::URL::Twitter,
Source::URL::HentaiFoundry,
Source::URL::Plurk,
Source::URL::Skeb,
Source::URL::TwitPic,
@@ -54,7 +55,7 @@ module Source
# @return [String, nil] The name of the site this URL belongs to, or possibly nil if unknown.
def site_name
self.class.name.demodulize
self.class.name.demodulize.titleize
end
protected def initialize(...)