New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: "name='ttwid', domain=None, path=None" #979
Comments
I have the same error |
in this location try to change hearders . File "/home/me/Tk/env/lib/python3.11/site-packages/TikTokApi/api/trending.py
|
Can confirm, I have also this issue from this:
The suggestion from @souffyan does not seem to help - the error dissapears, but the code is freezing and does not return anything. |
me to . |
from TikTokApi import TikTokApi
with TikTokApi() as api:
user = api.user(username="therock")
for video in user.videos():
print(video.id) I've tested the one from the example, and also getting the same error |
Any updates about this issue? |
any fix?? |
Any updates? |
same issue here! |
and updates |
Same problem here. This is the code (including the cookie):
The output: Requesting data from TikTok |
Same issue on Python 3.8 and 3.11 |
Having the same issue on all my systems: Windows 11 with Python 3.11, Windows 10 with Python 3.10 and MacOS Venture 13.0.1 with Python 3.11.1 |
Same issue on macOS Big Sur, Python 3.8, TikTokApi==5.2.2 spawn = requests.head(
"https://www.tiktok.com",
proxies=Trending.parent._format_proxy(processed.proxy),
**Trending.parent._requests_extra_kwargs,
)
with open("cookies.txt", "w") as file:
file.write(str(spawn.cookies.keys()))
|
Does anyone know if this issue is present in older versions? If not, maybe it makes sense downgrading for the moment. |
also the same problem. is anyone managed to fix it? please let me know. |
I had the same problem but basically I was trying to download videos and
get some of the video data so I found a better library that would do this
for me:
https://github.com/Evil0ctal/Douyin_TikTok_Download_API
If you look into the scraper.py file you will see the functions that you
need to do this and basically all you gotta do is get the video id from the
url using the built in function and then you get video data using the video
id using the other built in function. Look at their readme.md page to see
how they used asyncio and all that. When you get the video data it's just a
massive dictionary that you can look through and get exactly what you want
from it. It will have links to where you can download the video
information.
Hope this helps.
…On Fri, May 26, 2023 at 5:02 PM Geng Liu ***@***.***> wrote:
also the same problem. is anyone managed to fix it? please let me know.
—
Reply to this email directly, view it on GitHub
<#979 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYTU533KAK45UKYQNKPRTSTXIEK7HANCNFSM6AAAAAASQKSTHU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Should be fixed in V6 I think it shouldn't load cookies directly anymore |
Hi i try am may ways to slove the problem .
File "/home/me/Tk/main.py", line 29, in <module> for trending_video in api.trending.videos(count=5): File "/home/me/Tk/env/lib/python3.11/site-packages/TikTokApi/api/trending.py", line 40, in videos ttwid = spawn.cookies["ttwid"] ~~~~~~~~~~~~~^^^^^^^^^ File "/home/devy/Tk/env/lib/python3.11/site-packages/requests/cookies.py", line 334, in __getitem__ return self._find_no_duplicates(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/me/Tk/env/lib/python3.11/site-packages/requests/cookies.py", line 413, in _find_no_duplicates raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}") KeyError: "name='ttwid', domain=None, path=None"
The text was updated successfully, but these errors were encountered: