Closed Veucci closed 1 year ago
As far as I know, TikTok doesn't provide a way to do this in the browser, so there's not any simple answer that I know of. From what I've seen, there's a chrome extension that can do this for user pages, and it works by scrolling down to the bottom of the page to load all of the videos on the page and then sort them from there. TikTokPy could theoretically do the same thing.
It's worth noting though that because TikTok doesn't provide this as an option, any solution won't be perfect. The more popular the tag, the worse it will be. For any solution, you'd probably need to do something like "grab the first n videos from a tag/user, sort them by view count." For smaller tags, you may be able to grab all of them, but for something like #fyp
, you'd be limited by your memory.
Currently, attempting to do this would not be straightforward with TikTokPy, but I have an idea that would make it a lot more straightforward, and I'll give it a try shortly.
Thanks for answer and api.
I'm going to update the documentation and throw in some other things and I'll include the sorting in the next release.
I'll close the issue when I merge the changes.
Implemented by #5. Relevant documentation update: https://tiktokpy.readthedocs.io/en/latest/users/usage.html#iterate-over-sorted-user-videos
Updating to v0.1.6 will make these changes available.
Is it possible to select videos based on the number of views in a Challenge? I want to find videos which is not popular .