From 46440fda2d6e1829f4fa3d63a56af431bcf08cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 28 Nov 2016 22:30:00 +0100 Subject: [PATCH] [imagevenue] add extractor --- gallery_dl/extractor/imagehosts.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py index 10d9cd72..3fc558bb 100644 --- a/gallery_dl/extractor/imagehosts.py +++ b/gallery_dl/extractor/imagehosts.py @@ -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"