From cb53b293914cead2e87d8a1c9f50d83d45bf6743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 3 Dec 2015 01:07:59 +0100 Subject: [PATCH] [imagetwist] adjust pattern and other fixes --- gallery_dl/extractor/imagetwist.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/imagetwist.py b/gallery_dl/extractor/imagetwist.py index c64ed059..80cdfaa2 100644 --- a/gallery_dl/extractor/imagetwist.py +++ b/gallery_dl/extractor/imagetwist.py @@ -15,24 +15,24 @@ class ImagetwistExtractor(Extractor): category = "imagetwist" directory_fmt = ["{category}"] - filename_fmt = "{category}_{index}_{filename}" - pattern = [r"(?:https?://)?(?:www\.)?imagetwist\.com/([^/]+)"] + filename_fmt = "{category}_{user}_{filename}" + pattern = [r"(?:https?://)?(?:www\.)?imagetwist\.com/([a-z0-9]{12})"] def __init__(self, match): Extractor.__init__(self) self.token = match.group(1) def items(self): - yield Message.Version, 1 page = self.request("http://imagetwist.com/" + self.token).text url , pos = text.extract(page, '