TikTok-Api icon indicating copy to clipboard operation
TikTok-Api copied to clipboard

[BUG] - Quick start example throws error

Open lex0tan opened this issue 2 years ago • 1 comments

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

lex0tan avatar Sep 05 '22 00:09 lex0tan

#895

andyle0302 avatar Sep 05 '22 12:09 andyle0302

Fixed in V6

davidteather avatar Aug 08 '23 22:08 davidteather