Closed Lem0nTree closed 4 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.99. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
You need to specify the count in the search_by_hashtag() method. The following code does as you wish.
from TikTokApi import TikTokapi
# Starts The Api Class
api = TikTokapi("browsermob-proxy/bin/browsermob-proxy")
# The Number of trending TikToks you want to be displayed
results = 20
# Searches for the top trending hashtag of TikTok
result = api.search_by_hashtag("meme", count=results)
for tiktok in result:
# Prints the text of the tiktok
print(tiktok['itemInfos']['text'])
print(len(result))
api.quit_browser()
Describe the bug
Even with the variable results setted, the code can't show more than 10 results The buggy code
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context