TikTok-Api
TikTok-Api copied to clipboard
[BUG] - KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) KeyError: "name='ttwid', domain=None, path=None"
Fill Out the template :)
Describe the bug
A clear and concise description of what the bug is.
The buggy code
Please add any relevant code that is giving you unexpected results.
Preferably the smallest amount of code to reproduce the issue.
from TikTokApi import TikTokApi
api = TikTokApi(custom_verify_fp="***")
for video in api.trending.videos():
print(video)
Expected behavior
A clear and concise description of what you expected to happen.
Error Trace (if any)
Put the error trace below if there's any error thrown.
File "D:\Project\Python\tiktok\main.py", line 7, in <module>
for video in api.trending.videos():
File "D:\Project\Python\tiktok\venv\lib\site-packages\TikTokApi\api\trending.py", line 40, in videos
ttwid = spawn.cookies["ttwid"]
File "D:\Project\Python\tiktok\venv\lib\site-packages\requests\cookies.py", line 328, in __getitem__
return self._find_no_duplicates(name)
File "D:\Project\Python\tiktok\venv\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"
Desktop (please complete the following information):
- OS: Windows 10
- TikTokApi Version 5.0.0
Additional context
Add any other context about the problem here.
I have same problem
same story
Same problem
Just so you're aware it's a problem with your IP getting detected so might be worth slowing down requests made
Same here Fails even with passing ttwid to kwargs
But api.user(username=X) works and returns user ID etc..
Just so you're aware it's a problem with your IP getting detected so might be worth slowing down requests made
same error when use api.user(username="***")
i use different country proxy, most error as like "KeyError: "name='ttwid', domain=None, path=None""
by the way ,when i use US proxy , its error like "TikTok blocks this request displaying a Captcha"
im confused
It's most definitely not an IP detection issue at least on my end, surely. It was working fine with V4.x.x~ and suddenly stopped. If I hard code the ttwid in V5 from my browser instance (logged in to account), I get a captcha error though. api.user works for me but not user.videos()
It's most definitely not an IP detection issue at least on my end, surely. It was working fine with V4.x.x~ and suddenly stopped. If I hard code the ttwid in V5 from my browser instance (logged in to account), I get a captcha error though. api.user works for me but not user.videos()
yes its user.videos() not work, but api.user work fine. Also v4 work fine on monday... but now not work./sad
I have same problem
i have same problem
I have the same problem
I have the same problem
I have the same problem
I have the same problem, API request to TikTok 403 response code, the server blocked the request
Same here, running from local PC
Use V6