Python TikTok API, search by tag AND trending

Viewed 1008

I looked into the official documentation of tiktokapi here

but apparently it's not possible to download videos by searching for hashtags AND sorted by ranking. It looks like it's only possible to download either only the top rated videos OR some videos by hashtag.

This is quite annoying because if I use the hashtag research I get always the same videos.

Some code just for your info:

from TikTokApi import TikTokApi
from pathlib import Path
# Import everything needed to edit video clips
from moviepy.editor import *

api = TikTokApi.get_instance()
results = 20

Path("TT_downloads").mkdir(exist_ok=True) # creates folder

videosbyhashtag = api.by_hashtag("cats", count=results,custom_verifyFp="verify_******************")

Any idea how can I download tiktok video by hashtag AND only top rated videos?

0 Answers
Related