Skip to content

[TikTok] You cannot extract e.g. the liked posts of a private account that has zero posts #8971

@CasualYT31

Description

@CasualYT31

This is ultimately down to the 10222 status code that TikTok always responds with when accessing a private account's page. The video_count > 0 check within TiktokExtractor._check_status_code() is serviceable for post extraction, but won't work for any other kind of extraction.

The trouble is that we can't just remove the 10222 check, as attempting to extract the liked posts of a private account you don't have the cookies for will cause an infinite loop. The responses given by favorite/item_list include no items, but a hasMore value of true, and due to the edge case found within post extraction (#8968) I don't feel 100% comfortable with exiting early if no liked videos are found irrespective of the hasMore flag.

We need a proper way to identify if the user has access to the given account with the given cookies.

Workaround

You should be able to upload a non-private video/photo post to a private account to make the video_count > 0 check pass. By "non-private," the post needs to be as visible as possible, i.e. visible to followers, as posts that are only visible to the uploader don't seem to increase the video_count that gallery-dl is able to check.

This workaround will obviously only work for accounts that you own.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions