From eb64fb267c743020f6ebbcc958f35a902b7a379b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 8 Jul 2017 17:16:41 +0200 Subject: [PATCH] [nyafuu] add thread extractor (#18) --- gallery_dl/extractor/__init__.py | 1 + gallery_dl/extractor/nyafuu.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gallery_dl/extractor/nyafuu.py diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 4687f586..7cf5eabc 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -53,6 +53,7 @@ modules = [ "mangastream", "nhentai", "nijie", + "nyafuu", "pawoo", "pinterest", "powermanga", diff --git a/gallery_dl/extractor/nyafuu.py b/gallery_dl/extractor/nyafuu.py new file mode 100644 index 00000000..80d4b004 --- /dev/null +++ b/gallery_dl/extractor/nyafuu.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://archive.nyafuu.org/""" + +from . import chan + + +class NyafuuThreadExtractor(chan.FoolfuukaThreadExtractor): + """Extractor for images from threads on nyafuu.org""" + category = "nyafuu" + root = "https://archive.nyafuu.org" + pattern = [r"(?:https?://)?(?:archive\.)?nyafuu\.org/([^/]+)/thread/(\d+)"] + test = [("http://archive.nyafuu.org/c/thread/2849220/", { + "url": "bbe6f82944a45e359f5c8daf53f565913dc13e4f", + })]