-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
from kickapi import KickAPI
client = KickAPI(
client_id='',
client_secret=''
)
def get_top_streamers(limit=10):
try:
streams = client.streams.get_live_streams()
sorted_streams = sorted(streams, key=lambda x: x.viewer_count, reverse=True)[:limit]
print(f"Top {limit} live streamers:")
for i, stream in enumerate(sorted_streams, 1):
print(f"{i}. {stream.user_name} - Viewers: {stream.viewer_count}")
except Exception as e:
print(f"{e}")
if name == "main":
get_top_streamers()
Metadata
Metadata
Assignees
Labels
No labels