phillychi3 / youtube_lv

youtuber live status
https://pypi.org/project/youtube-lv
Apache License 2.0
8 stars 1 forks source link

List of live streams available on a channel with +1 live online #1

Closed italo2480 closed 1 month ago

italo2480 commented 1 month ago

Hello friend, first of all I would like to thank you for your Python library, it has helped me a lot.

I just have a few questions:

I use a YouTube channel that, especially now during the 2024 Olympics, has +7 live broadcasts on its channel. I noticed that using your library, it only lists 1 live broadcast on the channel, and not all the live broadcasts available on that channel. Is there any way I can make it list all the live broadcasts available on a channel and their information?

phillychi3 commented 1 month ago

Thank you for using this lib!

Next, I apologize for the inconvenience. This library cannot detect multiple simultaneous live streams. You might need to use the official YouTube API

If you don't want to use the official API, perhaps you can check the status of the https://www.youtube.com/@channelname/streams page.

italo2480 commented 1 month ago

Thanks for the tip, but using /streams it only lists me like this:

PS C:\Users\Mateus\Documents\MY TELEGRAM BOTS> python BotAvisaLivebot.py Youtube(channellink='https://www.youtube.com/@CazeTV', link='https://www.youtube.com/watch?v=a7pcu1svPXc', status='LIVE', islive=True, title='SURFING - WOMEN AND MEN | SECOND PHASE | PARIS 2024 OLYMPIC GAMES | LIVE AND WITH IMAGES', picture='https://i.ytimg.com/vi/a7pcu1svPXc/maxresdefault_live.jpg', timestamp=None) PS C:\Users\Mateus\Documents\MY TELEGRAM BOTS>

Only 1 stream and not the list of all streams available on the live channel

Code:

from ytlv import youtube live=youtube("https://www.youtube.com/@CazeTV/streams") print(live)

return Youtube class

phillychi3 commented 1 month ago

add new function youtube_lives