[imgtaxi] add 'image' extractor (#8019)
This commit is contained in:
@@ -487,6 +487,12 @@ Consider all listed sites to potentially be NSFW.
|
||||
<td>individual Images</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ImgTaxi.com</td>
|
||||
<td>https://imgtaxi.com/</td>
|
||||
<td>individual Images</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>imgth</td>
|
||||
<td>https://imgth.com/</td>
|
||||
|
||||
@@ -417,3 +417,12 @@ class ImgdriveImageExtractor(ImagehostImageExtractor):
|
||||
url , pos = text.extract(
|
||||
page, 'property="og:image" content="', '"', pos)
|
||||
return url.replace("/small/", "/big/"), title.rsplit(" | ", 2)[0]
|
||||
|
||||
|
||||
class ImgtaxiImageExtractor(ImagehostImageExtractor):
|
||||
"""Extractor for single images from imgtaxi.com"""
|
||||
category = "imgtaxi"
|
||||
pattern = r"(?:https?://)?((?:www\.)?imgtaxi\.com/img-(\w+)\.html)"
|
||||
example = "https://imgtaxi.com/img-0123456789abc.html"
|
||||
|
||||
get_info = ImgdriveImageExtractor.get_info
|
||||
|
||||
@@ -86,6 +86,7 @@ CATEGORY_MAP = {
|
||||
"imagechest" : "ImageChest",
|
||||
"imgdrive" : "ImgDrive.net",
|
||||
"imgkiwi" : "IMG.Kiwi",
|
||||
"imgtaxi" : "ImgTaxi.com",
|
||||
"imgth" : "imgth",
|
||||
"imgur" : "imgur",
|
||||
"imhentai" : "IMHentai",
|
||||
|
||||
22
test/results/imgtaxi.py
Normal file
22
test/results/imgtaxi.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import imagehosts
|
||||
|
||||
|
||||
__tests__ = (
|
||||
{
|
||||
"#url" : "https://imgtaxi.com/img-61c71cea940d6.html",
|
||||
"#category": ("imagehost", "imgtaxi", "image"),
|
||||
"#class" : imagehosts.ImgtaxiImageExtractor,
|
||||
"#results" : "https://imgtaxi.com/images/big/2021/12/25/61c71cea940d5.jpg",
|
||||
|
||||
"filename" : "SLn_0001",
|
||||
"extension": "jpg",
|
||||
"token" : "61c71cea940d6",
|
||||
},
|
||||
|
||||
)
|
||||
Reference in New Issue
Block a user