1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 04:32:51 +01:00

[imagevenue] add extractor

This commit is contained in:
Mike Fährmann 2016-11-28 22:30:00 +01:00
parent 3c1daef839
commit 46440fda2d
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -11,6 +11,7 @@
from .common import Extractor, Message
from .. import text
from os.path import splitext
from urllib.parse import urljoin
class ImagehostImageExtractor(Extractor):
"""Base class for single-image extractors for various imagehosts"""
@ -181,6 +182,19 @@ class ImgtrialImageExtractor(ImgspotImageExtractor):
pattern = [r"(?:https?://)?((?:www\.)?imgtrial\.com/img-([a-z0-9]+)\.html)"]
class ImagevenueImageExtractor(ImagehostImageExtractor):
"""Extractor for single images from imagevenue.com"""
category = "imagevenue"
pattern = [(r"(?:https?://)?(img\d+\.imagevenue\.com/"
r"img\.php\?image=(\d+)_.+)")]
params = None
def get_info(self, page):
url = text.extract(page, 'SRC="', '"')[0]
url = urljoin(self.url, url)
return url, url
class ImagetwistImageExtractor(ImagehostImageExtractor):
"""Extractor for single images from imagetwist.com"""
category = "imagetwist"