diff --git a/docs/configuration.rst b/docs/configuration.rst index ca5a1ded..cfe61152 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -3021,6 +3021,16 @@ Note `fanbox.comments `__ +extractor.fanbox.creator.offset +------------------------------- +Type + ``integer`` +Default + ``0`` +Description + Custom ``offset`` starting value when paginating over posts. + + extractor.fansly.formats ------------------------ Type diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index 429c1a93..5090fe11 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -338,7 +338,11 @@ "comments": false, "embeds" : true, "fee-max" : null, - "metadata": false + "metadata": false, + + "creator": { + "offset": 0 + } }, "fansly": { diff --git a/gallery_dl/extractor/fanbox.py b/gallery_dl/extractor/fanbox.py index 2ee168dc..53868a2b 100644 --- a/gallery_dl/extractor/fanbox.py +++ b/gallery_dl/extractor/fanbox.py @@ -362,9 +362,20 @@ class FanboxCreatorExtractor(FanboxExtractor): def _pagination_creator(self, url): urls = self.request_json(url, headers=self.headers)["body"] + if offset := self.config("offset"): + quotient, remainder = divmod(offset, 10) + if quotient: + urls = urls[quotient:] + else: + remainder = None + for url in urls: url = text.ensure_http_scheme(url) - yield from self.request_json(url, headers=self.headers)["body"] + posts = self.request_json(url, headers=self.headers)["body"] + if remainder: + posts = posts[remainder:] + remainder = None + yield from posts class FanboxPostExtractor(FanboxExtractor):