you-get

repository·develop·Indexed 13 days ago

https://github.com/soimort/you-get

A lightweight command-line utility to download media content, including videos, audio, and images, from websites such as YouTube, Youku, and Niconico. It features support for specific stream selection via --itag, GUI mode, proxy configuration, and the ability to stream content directly to media players like VLC or mpv.

Tokens
10.9K
Snippets
46
Records
51
Agent score
99%

What's inside you-get

  1. Pause and resume downloads

    develop

    You can interrupt a download using Ctrl+C. you-get maintains a temporary .download file in the output directory. Running the same command again will resume the download from where it left off.

    To force a complete re-download and overwrite existing files, use the --force or -f option.

    you-get -f 'https://example.com/video.mp4'
  2. Configure proxy settings

    develop

    You can specify an HTTP proxy using the --http-proxy or -x option. By default, you-get respects the system http_proxy environment variable. To disable all proxies, use the --no-proxy option.

    For specific sites (like Youku) that require a proxy for information extraction, use --extractor-proxy or -y.

    # Use a specific HTTP proxy
    you-get -x 127.0.0.1:8087 'https://example.com/video'
    
    # Use a proxy specifically for the extractor
    you-get -y 127.0.0.1:8087 'https://youku.com/video'
  3. Inspect available video qualities and formats

    develop

    To see all available formats, qualities, and codecs for a video before downloading, use the --info or -i option. This is particularly useful for selecting a specific itag for a preferred container (e.g., mp4 vs webm) or resolution.

    you-get -i 'https://www.youtube.com/watch?v=jNQXAC9IVRw'
  4. Upgrade you-get

    develop

    To upgrade your existing installation, use the following commands depending on your installation method:

    If installed via pip:

    pip install --upgrade you-get

    To force reinstall the latest develop branch via git:

    pip install --upgrade --force-reinstall git+https://github.com/soimort/you-get@develop
  5. Download media with you-get

    develop

    Use the you-get command-line utility to download videos, audios, or images from various websites (including YouTube, Youku, and Niconico).

    To download a video from a URL, run:

    you-get 'URL'

    If a site provides multiple stream formats (e.g., different qualities or containers), you-get will list them. You can select a specific stream using the --itag flag followed by the desired itag number.

    $ you-get 'https://www.youtube.com/watch?v=jNQXAC9IVRw'
  6. Install you-get from GitHub source

    develop

    You can install directly from a downloaded GitHub archive or a cloned repository.

    From a directory containing the source:

    # Install to a permanent path
    python -m pip install .
    
    # Or install to a user-specific path
    python -m pip install . --user

    Using pipenv (for virtual environments):

    pipenv install -e .
    pipenv run you-get --version

    Using Git clone (Recommended for developers):

    git clone git://github.com/soimort/you-get.git

    Then either add the directory to your PATH or run python -m pip install path/to/you-get.

  7. Stream video directly to a media player

    develop

    Instead of downloading the file to disk, use the --player or -p option to feed the stream directly into a media player like vlc, mpv, or even a browser like chromium.

    you-get -p vlc 'https://www.youtube.com/watch?v=jNQXAC9IVRw'
  8. Load cookies for private content

    develop

    To access private or age-restricted videos, use the --cookies or -c option to provide browser cookies. Supported formats are Mozilla cookies.sqlite and Netscape cookies.txt.

    you-get -c cookies.txt 'https://www.youtube.com/watch?v=private_video'