Davincible / gotiktoklive

Go library to track TikTok live streams in realtime
MIT License
107 stars 26 forks source link

TrackUser - Live Room does not working #9

Open kataras opened 1 year ago

kataras commented 1 year ago

Hello @Davincible,

The source code of this repository does not work when I want to track user's live room. It gets an unexpected status code of 200 while trying to upgrade the connection from http to webscoket. However, its javascript version of it: https://github.com/zerodytrash/TikTok-Live-Connector works as expected.

I checked all the above compared with the working solution at repository: zerodytrash/TikTok-Live-Connector. Here is what I found:

The URL for the websocket connection request is the same in both solutions, except for the room ID query parameter. The working solution includes the room ID as a query parameter using the live_id key, while the non-working solution does not. This may be required by the TikTok server to establish a connection.

The headers for the websocket connection request are different in both solutions. The working solution sends a header named x-tt-webcast-chat-version with the value of chatVersion from the webcast state object, while the non-working solution does not send any headers. This may be required by the TikTok server to verify the chat version and prevent outdated clients from connecting.

I would suggest to:

I have tried to make the changes but couldn't find the webcast state information, also I found that the proto types differs between these two repositories.

Could you please fix the issue? I will be glad to sponsor you as well.

Davincible commented 1 year ago

Hi @kataras,

Yes I am aware the current state is not working, there are a few additional things to implement here.

I have since focussed my efforts on a private TikTok API package that incorporates more endpoints, not publicly accessible here as it performs some extra magic.

Since you're considering sponsorship feel free to email me or message me on telegram @davincible and we can discuss the details

luck-xiaokun commented 11 months ago

I also tried to make this code run with node.js requests, I received the error Handshake-Msg:[auth failed], I couldn't keep trying for unknown validation rules, I had to give up golang to use

BlakeFunTeis commented 11 months ago

Hi @kataras,

Yes I am aware the current state is not working, there are a few additional things to implement here.

I have since focussed my efforts on a private TikTok API package that incorporates more endpoints, not publicly accessible here as it performs some extra magic.

Since you're considering sponsorship feel free to email me or message me on telegram @Davincible and we can discuss the details

I have dispatched an email to you.