davidteather / TikTok-Api

The Unofficial TikTok API Wrapper In Python
https://davidteather.github.io/TikTok-Api
MIT License
4.52k stars 928 forks source link

Any function returns permanently empty fields #1128

Closed nedoai closed 3 weeks ago

nedoai commented 3 months ago

The basic function that is provided in the documentation returns status_code = 0 and that's it. All other functions return an empty dictionary in the same way.

annashamsili commented 3 months ago

I also have this issue, but I get "TikTok returned empty string"

tigra323 commented 3 months ago

I also get an empty response. But status code 0 is the same as status code 200, which means OK

nedoai commented 3 months ago

I also get an empty response. But status code 0 is the same as status code 200, which means OK

Oh, thanks. But the question with empty answers remains open

jdeplato commented 3 months ago

Using the comment example and not altering it, I'm getting the following error:

File "C:\Python312\Lib\site-packages\TikTokApi\tiktok.py", line 430, in make_request raise EmptyResponseException(result, "TikTok returned an empty response") TikTokApi.exceptions.EmptyResponseException: None -> TikTok returned an empty response

Any updates / assistance would be appreciated - could TikTok have updated/changed their API endpoint?

HTShin commented 3 months ago

I also get this issue and try change another API endpoint, but not working.

I guess Tiktok API update header to get data

Ref Tiktok API endpoint: https://gist.github.com/nhandt64/f691579d31898ee023d921dd21866c54

Gereks123 commented 3 months ago

When using the example of fetching a user: https://github.com/davidteather/TikTok-Api/blob/main/examples/user_example.py

I get the following error: Got an unexpected status code: {'userInfo': {'user': {}, 'stats': {}, 'shareMeta': {}}} data["userInfo"]["user"]["id"],


KeyError: 'id'

Seems like the headers are updated/API endpoints have changed
tigra323 commented 1 month ago

Solution here: #1090 (comment) Addition: here links for browsers: linux win32 win64 from here P.s. just add argument "executable_path" to create_session with path to chrome