[GH-ISSUE #78] API returned unexpected structures #15

Closed
opened 2026-10-13 19:45:40 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @daiwin on GitHub (Dec 8, 2025).
Original GitHub issue: https://github.com/Glitchy-Sheep/boosty-downloader/issues/78

Originally assigned to: @Glitchy-Sheep on GitHub.

Hi, get error when download a new authors post.

Boosty_Downloader.ERROR ❌: Boosty API returned unexpected structures, the client probably needs to be
updated.
Please report this at GitHub issues of the project: https://github.com/Glitchy-Sheep/boosty-downloader/issues

Details: [{'type': 'string_type', 'loc': ('title',), 'msg': 'Input should be a valid string', 'input': None,
'url': 'https://errors.pydantic.dev/2.12/v/string_type'}]

Originally created by @daiwin on GitHub (Dec 8, 2025). Original GitHub issue: https://github.com/Glitchy-Sheep/boosty-downloader/issues/78 Originally assigned to: @Glitchy-Sheep on GitHub. Hi, get error when download a new authors post. Boosty_Downloader.ERROR ❌: Boosty API returned unexpected structures, the client probably needs to be updated. Please report this at GitHub issues of the project: https://github.com/Glitchy-Sheep/boosty-downloader/issues Details: [{'type': 'string_type', 'loc': ('title',), 'msg': 'Input should be a valid string', 'input': None, 'url': 'https://errors.pydantic.dev/2.12/v/string_type'}]
Author
Owner

@RAGE191 commented on GitHub (Feb 18, 2026):

Still getting the same error

Boosty_Downloader.ERROR ❌: Boosty API returned unexpected structures, the client probably needs to be updated.
Please report this at GitHub issues of the project: https://github.com/Glitchy-Sheep/boosty-downloader/issues

Details: [{'type': 'string_type', 'loc': ('title',), 'msg': 'Input should be a valid string', 'input': None, 'url': 'https://errors.pydantic.dev/2.12/v/string_type'}]

<!-- gh-comment-id:3917801364 --> @RAGE191 commented on GitHub (Feb 18, 2026): Still getting the same error Boosty_Downloader.ERROR ❌: Boosty API returned unexpected structures, the client probably needs to be updated. Please report this at GitHub issues of the project: https://github.com/Glitchy-Sheep/boosty-downloader/issues Details: [{'type': 'string_type', 'loc': ('title',), 'msg': 'Input should be a valid string', 'input': None, 'url': 'https://errors.pydantic.dev/2.12/v/string_type'}]
Author
Owner

@Glitchy-Sheep commented on GitHub (Feb 18, 2026):

Hey guys, sorry for the late answer - pretty work-loaded right now.

Could you please verify that the post you'd like to download has a title?

The error tells us that it's probably empty, but before that I thought empty post titles were handled gracefully as empty strings.

That's strange, I'll check it soon.

<!-- gh-comment-id:3919603669 --> @Glitchy-Sheep commented on GitHub (Feb 18, 2026): Hey guys, sorry for the late answer - pretty work-loaded right now. Could you please verify that the post you'd like to download has a title? The error tells us that it's probably empty, but before that I thought empty post titles were handled gracefully as empty strings. That's strange, I'll check it soon.
Author
Owner

@RAGE191 commented on GitHub (Feb 18, 2026):

I am not sure if the script read the title from the main feed or opens each post sequentially. If opens each i can confirm both posts (one that was successfully downloaded and one that was not) has a pretty same structural <title>. If it is reading from the feed they are not the same. One that was successful has an <h2> that looks like <h2 class="Post-scss--module_title_lcBpS" data-test-id="COMMON_POST_POSTCONTENT:TITLE">title_text</h2> and the second post does not contains h2 at all

UPD:
After some time passed and new posts appeared in the Boosty feed that I am trying to download, I can say the issue may be related to feed scrolling. Posts that previously downloaded correctly now do not download in the same quantity as new posts appearing in the feed.

<!-- gh-comment-id:3920360492 --> @RAGE191 commented on GitHub (Feb 18, 2026): I am not sure if the script read the title from the main feed or opens each post sequentially. If opens each i can confirm both posts (one that was successfully downloaded and one that was not) has a pretty same structural `<title>`. If it is reading from the feed they are not the same. One that was successful has an `<h2>` that looks like `<h2 class="Post-scss--module_title_lcBpS" data-test-id="COMMON_POST_POSTCONTENT:TITLE">title_text</h2>` and the second post does not contains h2 at all UPD: After some time passed and new posts appeared in the Boosty feed that I am trying to download, I can say the issue may be related to feed scrolling. Posts that previously downloaded correctly now do not download in the same quantity as new posts appearing in the feed.
Author
Owner

@EugeneTeplitsky commented on GitHub (Mar 2, 2026):

I managed to resolve this problem locally by editing the file "infrastructure/boosty_api/models/post/post.py" to add validator on the 'title' field:

# rest of imports
from pydantic import BaseModel, validator

class PostDTO(BoostyBaseDTO):
    # rest of class

    @validator("title", pre=True)
    def none_to_empty(cls, v: object) -> object:
        if v is None:
            return ""
        return v

You can adjust to set to whatever you need for empty titles. YMMV.

<!-- gh-comment-id:3985902214 --> @EugeneTeplitsky commented on GitHub (Mar 2, 2026): I managed to resolve this problem locally by editing the file "infrastructure/boosty_api/models/post/post.py" to add validator on the 'title' field: ``` # rest of imports from pydantic import BaseModel, validator class PostDTO(BoostyBaseDTO): # rest of class @validator("title", pre=True) def none_to_empty(cls, v: object) -> object: if v is None: return "" return v ``` You can adjust to set to whatever you need for empty titles. YMMV.
Author
Owner

@Glitchy-Sheep commented on GitHub (Apr 11, 2026):

Solved in #98

<!-- gh-comment-id:4230052831 --> @Glitchy-Sheep commented on GitHub (Apr 11, 2026): Solved in #98
Author
Owner

@Glitchy-Sheep commented on GitHub (Apr 11, 2026):

Finally managed to solve this, guys - it took a long time to get home to my PC!

<!-- gh-comment-id:4230079724 --> @Glitchy-Sheep commented on GitHub (Apr 11, 2026): Finally managed to solve this, guys - it took a long time to get home to my PC!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#15
No description provided.