Closed wingceltis-c closed 2 years ago
Can you clarify, what do you mean you cannot get the live broadcast information?
yes , can't get gifts 、like、join、comment information.
Really gonna need more. What do you mean you can't get gifts, like, join, comment information. Why. What's wrong. What code do you have. What errors are you getting.
Are your results correct?
known
I also encountered this problem
yes everyone will encounter this
TikTok no longer allows access to the webcast service without authentication.
client: TikTokLiveClient = TikTokLiveClient( unique_id='userID', **( { "enable_extended_gift_info": True, "headers": { "Cookie": "sessionid=sessionID#;", } } ) )
It's not a great idea to force people authenticate. There is still a way to do it without login; we are working on it atm.
TikTok no longer allows access to the webcast service without authentication.
- You need to retrieve the session ID using developer mode on a web browser. ----- Developer Tools > Application tab > Cookies > Session ID
- Add the header request to the client connection:
client: TikTokLiveClient = TikTokLiveClient( unique_id='userID', **( { "enable_extended_gift_info": True, "headers": { "Cookie": "sessionid=sessionID#;", } } ) )
i cannot find Session ID
A fix is coming in the next few days. In the meanwhile, it is still possible to use the library with minor modifications.
Please view the tutorial here: https://www.youtube.com/watch?v=wjLerdxKgu0 You can also directly view the code here: https://gist.github.com/isaackogan/c8c8db53a4a27e719fcffe2f38c26f92
The following are the textual steps to fix your projects:
What does this do? It bypasses TikTok's new security by logging you in to your account. While it is 99% likely you will not be banned for this, make a throwaway account for it just in case. TikTok can tell you are scraping, they are just choosing to let you because you are logged in.
On that note, I've been working on the fix for about 14 hours now, so, I'm going to go to bed.
Regards, Isaac
Fixed in the new release: https://github.com/isaackogan/TikTokLive/releases/tag/v4.2.5
Describe the bug Running the examples/gifts.py can't get the live broadcast information,
Not sure if it has something to do with my network。
Has tiktok modified the protocol?