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
I'm unable to run even the examples with an added ms_token, I'm not sure if i had done everything right but i cant seem to understand exactly if i had also to add a cookie, or how do i get a cookie except from ms_token.
I think the line ms_token, None i had filled correctly.
I modified the example:
fromTikTokApiimportTikTokApiimportasyncioimportosms_token=os.environ.get("sySiUDTlgtCc9mZpdOuYuP1stjvSP8mgMSG3jQEDXBK6X86EuOqzLjjFAs8KMWVrg1G_8C7uTxm4We4_oDyjZidveAfd7lb5-DFhGFkaqsi8tRFnV7dYiIaPsxr0SFt6v-d6RSNE3JsNFqaYS8w=", None) # set your own ms_tokenasyncdefget_hashtag_videos():
asyncwithTikTokApi() asapi:
awaitapi.create_sessions(ms_tokens=[ms_token], num_sessions=1, sleep_after=3)
tag=api.hashtag(name="coldplayathens")
asyncforvideointag.videos(count=150):
print(video)
print(video.as_dict)
if__name__=="__main__":
asyncio.run(get_hashtag_videos())
Error Trace (if any)
Put the error trace below if there's any error thrown.
File "/usr/local/Cellar/[email protected]/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/[email protected]/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/vaggosval/Desktop/toktik/TikTok-Api/examples/hashtag_example.py", line 18, in <module>
asyncio.run(get_hashtag_videos())
File "/usr/local/Cellar/[email protected]/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/Cellar/[email protected]/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/Users/vaggosval/Desktop/toktik/TikTok-Api/examples/hashtag_example.py", line 12, in get_hashtag_videos
async for video in tag.videos(count=150):
File "/Users/vaggosval/Desktop/toktik/TikTok-Api/TikTokApi/api/hashtag.py", line 118, in videos
resp = await self.parent.make_request(
File "/Users/vaggosval/Desktop/toktik/TikTok-Api/TikTokApi/tiktok.py", line 441, in make_request
raise EmptyResponseException(result, "TikTok returned an empty response")
TikTokApi.exceptions.EmptyResponseException: None -> TikTok returned an empty response
Desktop (please complete the following information):
OS: [e.g. macOS 11.7.10]
TikTokApi Version [e.g. 6.4.0] - if out of date upgrade before posting an issue
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I finally , and also using this help, and chatGPT finally made to make a script to fetch and port to yt_dlp and download all videos i need.
BUT , as i undestand it only fetches till the public ones.. i mean, the hashtag has 2,000 videos, and even if im logged in and not logged in i can see through my browser 50 videos (45 sometimes)
and the TikTok-Api it COMPLETES and finishes the script on 45 videos..
Is there any workaround on this? how to fetch more? as logged in?
I'm unable to run even the examples with an added ms_token, I'm not sure if i had done everything right but i cant seem to understand exactly if i had also to add a cookie, or how do i get a cookie except from ms_token.
I think the line ms_token, None i had filled correctly.
I modified the example:
Error Trace (if any)
Put the error trace below if there's any error thrown.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: