You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since around 23 December 2024, the Tiktok-API library can't get the post info from tiktok.com. It keeps showing me the Empty Response exception when I calling user.info and video.info.
The buggy code
user.info code snippet
# Info: this code running inside a class called TikTokScrapper# self.get_ms_token() gets a random ms_token saved inside a text file that i copy paste from chrome browser that accesing tiktok.comasyncwithTikTokApi() asprofile_api:
awaitprofile_api.create_sessions(headless=False, ms_tokens=[self.get_ms_token()], num_sessions=1, sleep_after=3)
time.sleep(1)
user=profile_api.user(self.name)
user_data=awaituser.info()
video_data= []
asyncforvideoinuser.videos(count=self.num):
video_data.append(video.as_dict)
video.info code snippet
# Info: this code running inside a class called TikTokScrapper# self.get_ms_token() gets a random ms_token saved inside a text file that i copy paste from chrome browser that accesing tiktok.comasyncwithTikTokApi() asvideo_api:
awaitvideo_api.create_sessions(headless=False, ms_tokens=[self.get_ms_token()], num_sessions=1, sleep_after=3)
# get video infovideo=video_api.video(url=url)
video_info=awaitvideo.info()
Expected behavior
user.info code
User's profile information json will be get and stored in user_data variable for next step, getting video's information for process.
video.info code
Video information will store in video_info and prepared to process.
Error Trace (if any)
user.info code
DATETIME:2025-01-13 09:41:30 : TT_scrape | TikTokAPI error err = None -> TikTok returned an empty response | traceback=Traceback (most recent call last):
File "C:\XXX\scrapper.py", line 956, in TT_scrape
user_data = await user.info()
^^^^^^^^^^^^^^^^^
File "C:\XXX\env\Lib\site-packages\TikTokApi\api\user.py", line 76, in info
resp = await self.parent.make_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\XXX\env\Lib\site-packages\TikTokApi\tiktok.py", line 467, in make_request
raise EmptyResponseException(result, "TikTok returned an empty response")
TikTokApi.exceptions.EmptyResponseException: None -> TikTok returned an empty response
video.info code
API Error - None -> TikTok returned an empty response
Describe the bug
Since around 23 December 2024, the Tiktok-API library can't get the post info from tiktok.com. It keeps showing me the Empty Response exception when I calling
user.info
andvideo.info
.The buggy code
user.info
code snippetvideo.info
code snippetExpected behavior
user.info
codeuser_data
variable for next step, getting video's information for process.video.info
codevideo_info
and prepared to process.Error Trace (if any)
user.info
codevideo.info
codeDesktop:
Additional context
await page.goto(url)
disabled timeout as suggestion in [BUG] - playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. #1054 (comment) gets the connection closed exception)video.info
work when you click a video in Playwright browser to solve captcha manually. (user.info
doesn't work even you solve captcha manually)The text was updated successfully, but these errors were encountered: