Not too sure if it is the package or TikTok changes, but the url provided within video.as_dict no longer returns a video, but a 404 page.
async for video in api.hashtag(name=f"{topic}").videos(count=30, cursor=random.randint(0, 150)):
video_dict = video.as_dict
bitrate = video_dict['video']['bitrate']
for i in video_dict['video']['bitrateInfo']:
if bitrate == i["Bitrate"]:
print(i["PlayAddr"]["UrlList"])
response = requests.get(i["PlayAddr"]["UrlList"][-1])
Specifically, the last link of the UrlList is used to get the video.
Not too sure if it is the package or TikTok changes, but the url provided within video.as_dict no longer returns a video, but a 404 page.
Specifically, the last link of the UrlList is used to get the video.