From 21e0dfbe205e939a26229e265d947a8e96e45b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 2 Feb 2017 15:54:50 +0100 Subject: [PATCH] [chronos] raise NotFoundError instead of crashing --- gallery_dl/extractor/imagehosts.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py index 3e799c45..e6a80247 100644 --- a/gallery_dl/extractor/imagehosts.py +++ b/gallery_dl/extractor/imagehosts.py @@ -106,16 +106,23 @@ class ChronosImageExtractor(ImagehostImageExtractor): """Extractor for single images from chronos.to""" category = "chronos" pattern = [r"(?:https?://)?((?:www\.)?chronos\.to/([a-z0-9]{12}))"] - test = [("http://chronos.to/bdrmq7rw7v4y", { - "url": "7fcb3fe315c94283644d25ef47a644c2dc8da944", - "keyword": "04dbc71a1154728d01c931308184050d61c5da55", - "content": "0c8768055e4e20e7c7259608b67799171b691140", - })] + test = [ + ("http://chronos.to/bdrmq7rw7v4y", { + "url": "7fcb3fe315c94283644d25ef47a644c2dc8da944", + "keyword": "04dbc71a1154728d01c931308184050d61c5da55", + "content": "0c8768055e4e20e7c7259608b67799171b691140", + }), + ("http://chronos.to/bdrmq7rw7v4z", { + "exception": exception.NotFoundError, + }), + ] https = False params = "complex" def get_info(self, page): - url , pos = text.extract(page, '