pushshift/tiktok

fetch_all_comments stops before all comments are retrieved

Opened this issue · 0 comments

The current logic used to determine if all comments have been fetched is to use the "hasMore" field value to stop collecting comments for a video id. Apparently this field will return false when there are still additional comments that can be retrieved.

Additional comments can be retrieved by incrementing the cursor value to the appropriate value (the cursor parameter is used as a pagination value).

Additional logic needs to be put in place to ignore the hasMore field to continue collecting comments and terminating when all comments are collected. This may involve keeping a count of the total comments reported by the TikTok API and continuing to fetch additional comments until the total number fetched is near the reported total comment value.