diff --git a/docs/supportedsites.rst b/docs/supportedsites.rst index 8ec4da2f11..1b5837ab0e 100644 --- a/docs/supportedsites.rst +++ b/docs/supportedsites.rst @@ -31,6 +31,7 @@ HBrowse https://www.hbrowse.com/ Chapters, Manga Hentai Cafe https://hentai.cafe/ Chapters, Manga Hentai Foundry https://www.hentai-foundry.com/ |Capabilities-3| Hentai2Read https://hentai2read.com/ Chapters, Manga +HentaiFox https://hentaifox.com/ Chapters HentaiHere https://hentaihere.com/ Chapters, Manga Hitomi.la https://hitomi.la/ Galleries Idol Complex https://idol.sankakucomplex.com/ Pools, Posts, Tag-Searches Optional diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index f198840547..d76a6da30c 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -37,6 +37,7 @@ "hentai2read", "hentaicafe", "hentaifoundry", + "hentaifox", "hentaihere", "hitomi", "idolcomplex", diff --git a/gallery_dl/extractor/hentaifox.py b/gallery_dl/extractor/hentaifox.py new file mode 100644 index 0000000000..38def07317 --- /dev/null +++ b/gallery_dl/extractor/hentaifox.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# Copyright 2019 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. + +"""Extractors for https://hentaifox.com/""" + +from .common import ChapterExtractor +from .. import text + + +class HentaifoxChapterExtractor(ChapterExtractor): + """Extractor for a single manga chapter from hentaifox.com""" + category = "hentaifox" + filename_fmt = "{category}_{chapter_id}_{page:>03}.{extension}" + directory_fmt = ["{category}", "{chapter_id} {title}"] + archive_fmt = "{chapter_id}_{page}" + pattern = [r"(?:https?://)?(?:www\.)?hentaifox\.com/gallery/(\d+)"] + test = [("https://hentaifox.com/gallery/56622/", { + "pattern": r"https://i\d*\.hentaifox\.com/\d+/\d+/\d+\.jpg", + "count": 24, + "keyword": "a5cfc962e2b2c929942c357bd67f0cc32f834cec", + })] + root = "https://hentaifox.com" + + def __init__(self, match): + self.chapter_id = match.group(1) + url = "{}/gallery/{}".format(self.root, self.chapter_id) + ChapterExtractor.__init__(self, url) + + def get_metadata(self, page): + title, pos = text.extract(page, "