-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Tiktok API not responding to requests #13
Comments
Thanks! I just tried to do my six-weekly backup and yes, I get the same issue. It seems according to davidteather/TikTok-Api#1035 that this is an issue with the TikTok API itself trying to stop these kinds of requests. There may be a workaround that involves not using the API at all, since the JSON file has all the URLs for the video pages - just need to find a way to turn those HTML file links into MP4 links (which is what the API was doing). Will post back here if I get anything working. |
@samirelanduk, I believe I’m having the same issue. Here’s the errors I’m getting:
This is on MacOS Ventura 13.4.1. It also looks like a problem parsing the JSON file to me, but I’m not very familiar with Python, so let me know if I should open a separate issue. I hope your workaround works out. :) |
It's a bug in the Python API Wrapper davidteather/TikTok-Api#1012 There is a workaround (downgrading playwright and using login cookies) davidteather/TikTok-Api#1012 (comment) Or you can upgrade the TikTok API Wrapper to V6 where this issue is fixed with Edit: I tried to get it to run, but it seems the Wrappter API V6 does currently not support saving the video. (video as bytes is not implemented) |
Hi Sam, Your tool is a huge convenience and I have been using it for the better part of 8 months. I went to use it again this morning and believe the Tiktok API must have changed their JSON formatting a bit as I'm getting empty responses. I have tried rerunning and believe this is the issue. Please let me know when a fix is available or if you are planning on updating. Thanks.
C:\Users\Gabek\Documents\Projects\Tiktok>save.py bookmarked user_data.json saved
0%| | 0/1027 [00:00<?, ?it/s]ERROR:root:TikTok response:
0%| | 0/1027 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\Gabek\Documents\Projects\Tiktok\save.py", line 49, in
tiktok_dict = api.get_tiktok_by_id(tiktok_id, custom_did=did)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Gabek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TikTokApi\tiktok.py", line 1077, in get_tiktok_by_id
return self.get_data(url=api_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Gabek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TikTokApi\tiktok.py", line 298, in get_data
raise EmptyResponseError(
TikTokApi.exceptions.EmptyResponseError: Empty response from Tiktok to https://m.tiktok.com/api/item/detail/?aid=1988&app_name=tiktok_web&device_platform=web&referer=&root_referer=&user_agent=Mozilla%252F5.0%2B%28iPhone%253B%2BCPU%2BiPhone%2BOS%2B12_2%2Blike%2BMac%2BOS%2BX%29%2BAppleWebKit%252F605.1.15%2B%28KHTML%2C%2Blike%2BGecko%29%2BVersion%252F16.4%2BMobile%252F15E148%2BSafari%252F604.1&cookie_enabled=true&screen_width=1531&screen_height=1165&browser_language=&browser_platform=&browser_name=&browser_version=&browser_online=true&ac=4g&timezone_name=&appId=1233&appType=m&isAndroid=False&isMobile=False&isIOS=False&OS=windows&itemId=7255830375207800069&language=en&verifyFp=verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq&did=837347611&_signature=_02B4Z6wo00f01oSvMbQAAIBCjl6J2SQEMLaEvhUAAMWp71
The text was updated successfully, but these errors were encountered: