Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Live Streamed Videos #79

Closed
abe-101 opened this issue Jun 22, 2023 · 6 comments
Closed

Support Live Streamed Videos #79

abe-101 opened this issue Jun 22, 2023 · 6 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@abe-101
Copy link

abe-101 commented Jun 22, 2023

It seems that the download command only downloads transcripts of the uploaded videos
It would be nice to also support videos which are live streamed

@jasontucker
Copy link

I agree, it only supports the uploaded videos and doesnt support the live streamed ones. Any thoughts about adding this functionality?

@NotJoeMartinez
Copy link
Owner

@abe-101 do you have any examples of channels where you experience this issue? I could be an issue with the auto generated subtitles not loading until a period of time after they first streamed.

@NotJoeMartinez NotJoeMartinez added enhancement New feature or request bug Something isn't working labels Dec 19, 2023
@NotJoeMartinez
Copy link
Owner

So we can get all live streamed urls from a channel with:

yt-dlp --flat-playlist --print id "https://www.youtube.com/@channel_name/streams"

This is implemented with get_videos_list function

def get_videos_list(channel_url):
    """
    Scrapes list of all video urls from the channel
    """
    console = Console()

    with console.status("[bold green]Scraping video urls, this might take a little...") as status:
        cmd = [
            "yt-dlp",
            "--flat-playlist",
            "--print",
            "id",
            f"{channel_url}"
        ]
        res = subprocess.run(cmd, capture_output=True, check=True)
        list_of_videos_urls = res.stdout.decode().splitlines()

    return list_of_videos_urls 

This will work the same with channel_url + "/streams" so the solution is to somehow extend this functions
return values with the results from a search using the /streams path.

NotJoeMartinez added a commit that referenced this issue Dec 26, 2023
@NotJoeMartinez
Copy link
Owner

Added in "Support Live Streamed Videos #112"

@abe-101
Copy link
Author

abe-101 commented Dec 27, 2023

seeing this now

do you still need help testing out live streams?

@NotJoeMartinez
Copy link
Owner

If you see any other issues pop up feel free to make another issue, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants