Hey. Trying to scrape videos through a hashtag with original sound. It seems that the request fails after a few attempts with a variation in total tiktoks requested (sometimes get 40 or 140).
The error is as follows,
Exception has occurred: TikTokNotFoundError (note: full exception trace is shown but execution is paused at: )
Challenge funny does not exist
# I have tried both, the second ones gets further
api = TikTokApi.get_instance(use_selenium=True, executablePath="chromedriver_win32/chromedriver.exe", custom_verifyFp="ku3ta3mh_Gw9RP03S_uhb1_4YBD_Atrl_r6s7OcCvakHB")
api = TikTokApi()
# estimates the number of tiktoks, Average tiktok is around 15s
estimatedcount = int((length * 60) / float(15))
videoduration = 0
# Repeats until destied length is reached
while (length / float(60)) < length:
estimatedcount += 10
chosentiktoks = []
tiktoks = api.by_hashtag(hashtag=videohashtag, count=estimatedcount)
for tiktok in tiktoks:
if tiktok["music"]["title"] == "original sound":
videoduration += int(tiktok["video"]["duration"])
chosentiktoks.append(tiktok)
print(tiktok)
Hey. Trying to scrape videos through a hashtag with original sound. It seems that the request fails after a few attempts with a variation in total tiktoks requested (sometimes get 40 or 140).
The error is as follows, Exception has occurred: TikTokNotFoundError (note: full exception trace is shown but execution is paused at:)
Challenge funny does not exist