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
Temporary fix to it : in "tiktok.py" line 206, change headless=True, to false.
Or you can simply specify headless=False at api.create_sessions() :
from TikTokApi import TikTokApi
import asyncio
import os
ms_token = os.environ.get("ms_token", None) # get your own ms_token from your cookies on tiktok.com
async def trending_videos():
async with TikTokApi() as api:
await api.create_sessions(ms_tokens=[ms_token], num_sessions=1, sleep_after=3, headless=False)
async for video in api.trending.videos(count=30):
print(video)
print(video.as_dict)
asyncio.run(trending_videos())
Does anyone know what the cause of the ultra-common "EmptyResponseException: None -> TikTok returned an empty response" error is?
This article states that "TikTok's free APIs have usage restrictions. The commercial content API allows a maximum of 600 requests per day."
Is the "EmptyResponseException: None -> TikTok returned an empty response" error caused by a rate limit?
The text was updated successfully, but these errors were encountered: