diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 30792945..97362e2b 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -589,6 +589,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 8c42e1a7..7f787b1d 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -102,6 +102,7 @@ modules = [ "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 00000000..31599198 --- /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)]