Skip to content
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 cannot be used normally #27

Closed
ysyszheng opened this issue Oct 19, 2023 · 1 comment
Closed

TIkTok api cannot be used normally #27

ysyszheng opened this issue Oct 19, 2023 · 1 comment

Comments

@ysyszheng
Copy link

Hello developers, first of all thank you for providing such a great tool!

When I used the tiktok api provided by this repo to get comments on a certain video, I found that it could not run normally. The returned information was always 解析失败,检查参数/Parse failed, check parameters.

I tried to obtain information other than comments, such as parsing a single tiktok video mentioned in the README demo of this repo, and the returned message was still 解析失败,检查参数/Parse failed, check parameters.

Below is a simplified code I used and its corresponding output, the output of the get_user_info() function is normal, so I think there is no problem with my token.

I would like to know the reason why it is not working properly, such as the API is invalid or there is something wrong with my usage? Any helpful responses are welcome and appreciated :D

Code:

import asyncio
from tikhub import TikTokAPI

if __name__ == '__main__':
    token ="my_token"

    tiktok_api = TikTokAPI(token)

    tiktok_video_url = "https://www.tiktok.com/@cocoeatz/video/7251316303783316778"

    r = None

    r = asyncio.run(tiktok_api.get_user_info())
    print(r)

    r = asyncio.run(tiktok_api.get_tiktok_video_comments(tiktok_video_url))
    print(r)

Outputs:

{my user infomation}
{'status': False, 'platform': 'tiktok', 'endpoint': '/tiktok/video_comments/', 'total_time': None, 'message': '解析失败,检查参数/Parse failed, check parameters', 'video_id': None, 'has_more': None, 'cursor': None, 'next_url': None, 'count': None, 'comments_list': None}
@ysyszheng ysyszheng changed the title TikTok API can't use TIkTok api cannot be used normally Oct 19, 2023
@ysyszheng
Copy link
Author

There is the same problem in issue #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants