From 5a13ac8e3d473ff3c1b403a5800d6e63283510fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 5 Aug 2016 09:48:34 +0200 Subject: [PATCH] [doujinmode] small fixes + test --- README.rst | 4 ++-- gallery_dl/extractor/doujinmode.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index c646b769..47a2c9fe 100644 --- a/README.rst +++ b/README.rst @@ -43,8 +43,8 @@ Supported Sites mangapark.me, mangareader.net, mangashare.com, mangastream.com, powermanga.org, raw.senmanga.com, thespectrum.net * Hentai: - exhentai.org, hbrowse.com, hentai2read.com, hentai-foundry.com, hitomi.la, - luscious.net, nhentai.net + doujinmode.net, exhentai.org, hbrowse.com, hentai2read.com, + hentai-foundry.com, hitomi.la, luscious.net, nhentai.net * Japanese: pixiv.net, nijie.info * Western: diff --git a/gallery_dl/extractor/doujinmode.py b/gallery_dl/extractor/doujinmode.py index d81e0c24..bbf5444c 100644 --- a/gallery_dl/extractor/doujinmode.py +++ b/gallery_dl/extractor/doujinmode.py @@ -17,7 +17,13 @@ class DoujinmodeChapterExtractor(Extractor): category = "doujinmode" directory_fmt = ["{category}", "{title}"] filename_fmt = "{num:>03}.{extension}" - pattern = [r"(?:https?://)?(?:www\.)?doujinmode\.net/(?:hentai/)?mangas/([0-9a-f]{36})"] + pattern = [(r"(?:https?://)?(?:www\.)?doujinmode\.net/" + r"(?:hentai/|yaoi/|western/)?mangas/([0-9a-f]{36})")] + test = [("http://doujinmode.net/mangas/967836c988a716e9efca06998b7838d09eb5", { + "url": "be5d48a9fd48f09cfcc5d4e51f24bf1100e75502", + "keyword": "710cc9599faf563b0cad836bbc7d85b288fcda3a", + "content": "a041114e2a8af54d42a4a46a69cae4ebf2641cb1", + })] url_base = "http://doujinmode.net/mangas/" def __init__(self, match): @@ -40,7 +46,7 @@ class DoujinmodeChapterExtractor(Extractor): return { "category": self.category, "gallery-id": self.gid, - "title": title, + "title": text.unescape(title), "count": count, }