Skip to content

Conversation

@CasualYT31
Copy link
Contributor

In very rare edge cases, it is possible for TikTok to return no items from a creator/item_list request, whilst indicating that there are more items with the hasMorePrevious: true flag.

The yt-dlp code our extractor took inspiration from addressed this by manually rolling back the cursor. This is something we also carry out (see TiktokLegacyTimeCursor.next_page()), but there was a fault in the logic within TiktokItemListRequest.extract_items() that caused account extraction to exit early if it encountered no items, even if hasMorePrevious was true.

This PR addresses the fault by only exiting account extraction early if we encounter no items and TikTok indicates that no more posts are available. An item counter was added alongside the page logs to give users a better understanding of the extraction's progress.

It is worth noting that manually rolling back the cursor is something the TikTok website does not do, which causes affected accounts to have an empty or partial list of posts on their page, despite the user having posts uploaded to their account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants