summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/fanbox.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-08-12 02:42:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-08-12 02:42:36 -0400
commitb5e56c51e491b41f9eb6a895459c185788a377e5 (patch)
treef933c7df043d8949e0dc39b560ab534a5d0dc60f /gallery_dl/extractor/fanbox.py
parent032e5bed275a253e122ed9ac86dac7b8c4204172 (diff)
New upstream version 1.27.3.upstream/1.27.3
Diffstat (limited to 'gallery_dl/extractor/fanbox.py')
-rw-r--r--gallery_dl/extractor/fanbox.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/gallery_dl/extractor/fanbox.py b/gallery_dl/extractor/fanbox.py
index d81fd0b..d8337b6 100644
--- a/gallery_dl/extractor/fanbox.py
+++ b/gallery_dl/extractor/fanbox.py
@@ -309,8 +309,20 @@ class FanboxCreatorExtractor(FanboxExtractor):
self.creator_id = match.group(1) or match.group(2)
def posts(self):
- url = "https://api.fanbox.cc/post.listCreator?creatorId={}&limit=10"
- return self._pagination(url.format(self.creator_id))
+ url = "https://api.fanbox.cc/post.paginateCreator?creatorId="
+ return self._pagination_creator(url + self.creator_id)
+
+ def _pagination_creator(self, url):
+ urls = self.request(url, headers=self.headers).json()["body"]
+ for url in urls:
+ url = text.ensure_http_scheme(url)
+ body = self.request(url, headers=self.headers).json()["body"]
+ for item in body:
+ try:
+ yield self._get_post_data(item["id"])
+ except Exception as exc:
+ self.log.warning("Skipping post %s (%s: %s)",
+ item["id"], exc.__class__.__name__, exc)
class FanboxPostExtractor(FanboxExtractor):