diff --git a/docs/supportedsites.md b/docs/supportedsites.md index a0da7e8fb3..af65e202fd 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -595,6 +595,12 @@ Consider all sites to be NSFW unless otherwise known. Albums + + Nudecollect + https://nudecollect.com/ + Albums, individual Images + + Patreon https://www.patreon.com/ diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index bd5053269a..6140c2ce2e 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -103,6 +103,7 @@ "nitter", "nozomi", "nsfwalbum", + "nudecollect", "paheal", "patreon", "philomena", diff --git a/gallery_dl/extractor/nudecollect.py b/gallery_dl/extractor/nudecollect.py new file mode 100644 index 0000000000..3159919881 --- /dev/null +++ b/gallery_dl/extractor/nudecollect.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- + +# 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://nudecollect.com/""" + +from .common import GalleryExtractor +from .. import text + + +class NudecollectExtractor(GalleryExtractor): + """Base class for Nudecollect extractors""" + category = "nudecollect" + directory_fmt = ("{category}", "{title}") + filename_fmt = "{slug}_{num:>03}.{extension}" + archive_fmt = "{slug}_{num}" + root = "https://www.nudecollect.com" + + def request(self, url, **kwargs): + kwargs["allow_redirects"] = False + return GalleryExtractor.request(self, url, **kwargs) + + @staticmethod + def get_title(page): + return text.unescape(text.extr(page, "", ""))[31:] + + @staticmethod + def get_image(page): + return text.extr(page, '05}" + p2[4:] + return [(ufmt.format(num), None) for num in range(1, self.count + 1)]