From fbd7dcdfdb26d5532e668430d7631f21575dc59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 11 Jul 2017 17:14:50 +0200 Subject: [PATCH] [desuarchive] add thread extractor --- gallery_dl/extractor/__init__.py | 1 + gallery_dl/extractor/desuarchive.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gallery_dl/extractor/desuarchive.py diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 7cf5eabc..f9817a72 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -17,6 +17,7 @@ modules = [ "8chan", "batoto", "danbooru", + "desuarchive", "deviantart", "dokireader", "dynastyscans", diff --git a/gallery_dl/extractor/desuarchive.py b/gallery_dl/extractor/desuarchive.py new file mode 100644 index 00000000..49f0e84e --- /dev/null +++ b/gallery_dl/extractor/desuarchive.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +# Copyright 2017 Mike Fährmann +# +# 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. + +"""Extract images from https://desuarchive.org/""" + +from . import chan + + +class DesuarchiveThreadExtractor(chan.FoolfuukaThreadExtractor): + """Extractor for images from threads on desuarchive.org""" + category = "desuarchive" + root = "https://desuarchive.org" + pattern = [r"(?:https?://)?desuarchive\.org/([^/]+)/thread/(\d+)"] + test = [("https://desuarchive.org/a/thread/159542679/", { + "url": "e7d624aded15a069194e38dc731ec23217a422fb", + })]