Skip to content

Fanbox comments extraction doesn't account for insufficient pledge #8814

@Cappucirno

Description

@Cappucirno

When pledge is insufficient, the call to post.getComments returns "commentList":null, and then an attempt is made to call extend on null which throws.

[fanbox][debug] Using FanboxCreatorExtractor for 'https://rahime.fanbox.cc'
[fanbox][debug] cookies: Loading cookies from 'C:\cookies.txt'
[fanbox][debug] Sleeping 1.00 seconds (extractor)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.fanbox.cc:443
[urllib3.connectionpool][debug] https://api.fanbox.cc:443 "GET /post.paginateCreator?creatorId=rahime HTTP/1.1" 200 340
[fanbox][debug] Sleeping 1.00 seconds (request)
[urllib3.connectionpool][debug] https://api.fanbox.cc:443 "GET /post.listCreator?creatorId=rahime&firstPublishedDatetime=2025-12-25%2017%3A39%3A02&firstId=11122985&sort=newest&limit=10 HTTP/1.1" 200 1720
[urllib3.connectionpool][debug] https://api.fanbox.cc:443 "GET /post.info?postId=11122985 HTTP/1.1" 200 631
[urllib3.connectionpool][debug] https://api.fanbox.cc:443 "GET /creator.get?creatorId=rahime HTTP/1.1" 200 1072
[urllib3.connectionpool][debug] https://api.fanbox.cc:443 "GET /plan.listCreator?creatorId=rahime HTTP/1.1" 200 549
[urllib3.connectionpool][debug] https://api.fanbox.cc:443 "GET /post.getComments?limit=10&postId=11122985 HTTP/1.1" 200 None
[fanbox][error] An unexpected error occurred: TypeError - 'NoneType' object is not subscriptable. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[fanbox][debug]
Traceback (most recent call last):
File "C:\Users\JohnDoe\AppData\Local\pypoetry\Cache\virtualenvs\env\lib\site-packages\gallery_dl\job.py", line 158, in run
msg = self.dispatch(extractor)
File "C:\Users\JohnDoe\AppData\Local\pypoetry\Cache\virtualenvs\env\lib\site-packages\gallery_dl\job.py", line 209, in dispatch
for msg, url, kwdict in messages:
File "C:\Users\JohnDoe\AppData\Local\pypoetry\Cache\virtualenvs\env\lib\site-packages\gallery_dl\extractor\fanbox.py", line 78, in items
content_body, post = self._extract_post(item)
File "C:\Users\JohnDoe\AppData\Local\pypoetry\Cache\virtualenvs\env\lib\site-packages\gallery_dl\extractor\fanbox.py", line 154, in _extract_post
post["comments"] = list(self._get_comment_data(post["id"]))
File "C:\Users\JohnDoe\AppData\Local\pypoetry\Cache\virtualenvs\env\lib\site-packages\gallery_dl\extractor\fanbox.py", line 215, in _get_comment_data
comments.extend(data["items"])
TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions