TikTok-Api
TikTok-Api copied to clipboard
[BUG] - Quick start example throws error
I was testing the initial example, just to test what the api can do and i get an error, i installed playwright
with TikTokApi() as api:
for trending_video in api.trending.videos(count=50):
# Prints the author's username of the trending video.
print(trending_video.author.username)
A clear and concise description of what you expected to happen.
File "C:\Users\kekko\Desktop\rumble\main.py", line 9, in <module>
for trending_video in api.trending.videos(count=50):
File "C:\Users\kekko\AppData\Local\Programs\Python\Python310\lib\site-packages\TikTokApi\api\trending.py", line 40, in videos
ttwid = spawn.cookies["ttwid"]
File "C:\Users\kekko\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\cookies.py", line 328, in __getitem__
return self._find_no_duplicates(name)
File "C:\Users\kekko\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\cookies.py", line 399, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='ttwid', domain=None, path=None"
- OS: Windows 10
#895
Fixed in V6