isaackogan / TikTokLive

Python library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE.
https://isaackogan.github.io/TikTokLive/
MIT License
858 stars 173 forks source link

Get TikTok live information without event #242

Open Silme94 opened 1 month ago

Silme94 commented 1 month ago

Is there a way to get live information but with no event? Like for example a function to get the numbers of like or something? For example:

from TikTokLive import TikTokLiveClient
from TikTokLive.events import ConnectEvent, CommentEvent

# Create the client
client: TikTokLiveClient = TikTokLiveClient(unique_id="@isaackogz")

if __name__ == '__main__':
    # -- Exmaples --
    client.getLikes() # get the numbers of likes
    client.getViewvers() # get the numbers of people who are watching the live
    client.getGift("Rose") # return number of roses
isaackogan commented 1 month ago

You can grab room info which should have all this.

Silme94 commented 1 month ago

How? Because when i check the documentation i only see events. By the way i wanna get live information this way so i can just make an api to collect data, for example http://localhost?username=@isaackogz and it returns json data with live information.

isaackogan commented 1 month ago

https://isaackogan.github.io/TikTokLive/TikTokLive.client.web.routes.html

Silme94 commented 1 month ago

can you show me an example?