Command-line program to download videos from YouTube.com and other video sites

Overview

Build Status

youtube-dl - download videos from youtube.com or other video platforms

INSTALLATION

To install it right away for all UNIX users (Linux, macOS, etc.), type:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

If you do not have curl, you can alternatively use a recent wget:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Windows users can download an .exe file and place it in any location on their PATH except for %SYSTEMROOT%\System32 (e.g. do not put in C:\Windows\System32).

You can also use pip:

sudo -H pip install --upgrade youtube-dl

This command will update youtube-dl if you have already installed it. See the pypi page for more information.

macOS users can install youtube-dl with Homebrew:

brew install youtube-dl

Or with MacPorts:

sudo port install youtube-dl

Alternatively, refer to the developer instructions for how to check out and work with the git repository. For further options, including PGP signatures, see the youtube-dl Download Page.

DESCRIPTION

youtube-dl is a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.2+, and it is not platform specific. It should work on your Unix box, on Windows or on macOS. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

youtube-dl [OPTIONS] URL [URL...]

OPTIONS

-h, --help                           Print this help text and exit
--version                            Print program version and exit
-U, --update                         Update this program to latest version.
                                     Make sure that you have sufficient
                                     permissions (run with sudo if needed)
-i, --ignore-errors                  Continue on download errors, for
                                     example to skip unavailable videos in a
                                     playlist
--abort-on-error                     Abort downloading of further videos (in
                                     the playlist or the command line) if an
                                     error occurs
--dump-user-agent                    Display the current browser
                                     identification
--list-extractors                    List all supported extractors
--extractor-descriptions             Output descriptions of all supported
                                     extractors
--force-generic-extractor            Force extraction to use the generic
                                     extractor
--default-search PREFIX              Use this prefix for unqualified URLs.
                                     For example "gvsearch2:" downloads two
                                     videos from google videos for youtube-
                                     dl "large apple". Use the value "auto"
                                     to let youtube-dl guess ("auto_warning"
                                     to emit a warning when guessing).
                                     "error" just throws an error. The
                                     default value "fixup_error" repairs
                                     broken URLs, but emits an error if this
                                     is not possible instead of searching.
--ignore-config                      Do not read configuration files. When
                                     given in the global configuration file
                                     /etc/youtube-dl.conf: Do not read the
                                     user configuration in
                                     ~/.config/youtube-dl/config
                                     (%APPDATA%/youtube-dl/config.txt on
                                     Windows)
--config-location PATH               Location of the configuration file;
                                     either the path to the config or its
                                     containing directory.
--flat-playlist                      Do not extract the videos of a
                                     playlist, only list them.
--mark-watched                       Mark videos watched (YouTube only)
--no-mark-watched                    Do not mark videos watched (YouTube
                                     only)
--no-color                           Do not emit color codes in output

Network Options:

--proxy URL                          Use the specified HTTP/HTTPS/SOCKS
                                     proxy. To enable SOCKS proxy, specify a
                                     proper scheme. For example
                                     socks5://127.0.0.1:1080/. Pass in an
                                     empty string (--proxy "") for direct
                                     connection
--socket-timeout SECONDS             Time to wait before giving up, in
                                     seconds
--source-address IP                  Client-side IP address to bind to
-4, --force-ipv4                     Make all connections via IPv4
-6, --force-ipv6                     Make all connections via IPv6

Geo Restriction:

--geo-verification-proxy URL         Use this proxy to verify the IP address
                                     for some geo-restricted sites. The
                                     default proxy specified by --proxy (or
                                     none, if the option is not present) is
                                     used for the actual downloading.
--geo-bypass                         Bypass geographic restriction via
                                     faking X-Forwarded-For HTTP header
--no-geo-bypass                      Do not bypass geographic restriction
                                     via faking X-Forwarded-For HTTP header
--geo-bypass-country CODE            Force bypass geographic restriction
                                     with explicitly provided two-letter ISO
                                     3166-2 country code
--geo-bypass-ip-block IP_BLOCK       Force bypass geographic restriction
                                     with explicitly provided IP block in
                                     CIDR notation

Video Selection:

--playlist-start NUMBER              Playlist video to start at (default is
                                     1)
--playlist-end NUMBER                Playlist video to end at (default is
                                     last)
--playlist-items ITEM_SPEC           Playlist video items to download.
                                     Specify indices of the videos in the
                                     playlist separated by commas like: "--
                                     playlist-items 1,2,5,8" if you want to
                                     download videos indexed 1, 2, 5, 8 in
                                     the playlist. You can specify range: "
                                     --playlist-items 1-3,7,10-13", it will
                                     download the videos at index 1, 2, 3,
                                     7, 10, 11, 12 and 13.
--match-title REGEX                  Download only matching titles (regex or
                                     caseless sub-string)
--reject-title REGEX                 Skip download for matching titles
                                     (regex or caseless sub-string)
--max-downloads NUMBER               Abort after downloading NUMBER files
--min-filesize SIZE                  Do not download any videos smaller than
                                     SIZE (e.g. 50k or 44.6m)
--max-filesize SIZE                  Do not download any videos larger than
                                     SIZE (e.g. 50k or 44.6m)
--date DATE                          Download only videos uploaded in this
                                     date
--datebefore DATE                    Download only videos uploaded on or
                                     before this date (i.e. inclusive)
--dateafter DATE                     Download only videos uploaded on or
                                     after this date (i.e. inclusive)
--min-views COUNT                    Do not download any videos with less
                                     than COUNT views
--max-views COUNT                    Do not download any videos with more
                                     than COUNT views
--match-filter FILTER                Generic video filter. Specify any key
                                     (see the "OUTPUT TEMPLATE" for a list
                                     of available keys) to match if the key
                                     is present, !key to check if the key is
                                     not present, key > NUMBER (like
                                     "comment_count > 12", also works with
                                     >=, <, <=, !=, =) to compare against a
                                     number, key = 'LITERAL' (like "uploader
                                     = 'Mike Smith'", also works with !=) to
                                     match against a string literal and & to
                                     require multiple matches. Values which
                                     are not known are excluded unless you
                                     put a question mark (?) after the
                                     operator. For example, to only match
                                     videos that have been liked more than
                                     100 times and disliked less than 50
                                     times (or the dislike functionality is
                                     not available at the given service),
                                     but who also have a description, use
                                     --match-filter "like_count > 100 &
                                     dislike_count 

Download Options:

-r, --limit-rate RATE                Maximum download rate in bytes per
                                     second (e.g. 50K or 4.2M)
-R, --retries RETRIES                Number of retries (default is 10), or
                                     "infinite".
--fragment-retries RETRIES           Number of retries for a fragment
                                     (default is 10), or "infinite" (DASH,
                                     hlsnative and ISM)
--skip-unavailable-fragments         Skip unavailable fragments (DASH,
                                     hlsnative and ISM)
--abort-on-unavailable-fragment      Abort downloading when some fragment is
                                     not available
--keep-fragments                     Keep downloaded fragments on disk after
                                     downloading is finished; fragments are
                                     erased by default
--buffer-size SIZE                   Size of download buffer (e.g. 1024 or
                                     16K) (default is 1024)
--no-resize-buffer                   Do not automatically adjust the buffer
                                     size. By default, the buffer size is
                                     automatically resized from an initial
                                     value of SIZE.
--http-chunk-size SIZE               Size of a chunk for chunk-based HTTP
                                     downloading (e.g. 10485760 or 10M)
                                     (default is disabled). May be useful
                                     for bypassing bandwidth throttling
                                     imposed by a webserver (experimental)
--playlist-reverse                   Download playlist videos in reverse
                                     order
--playlist-random                    Download playlist videos in random
                                     order
--xattr-set-filesize                 Set file xattribute ytdl.filesize with
                                     expected file size
--hls-prefer-native                  Use the native HLS downloader instead
                                     of ffmpeg
--hls-prefer-ffmpeg                  Use ffmpeg instead of the native HLS
                                     downloader
--hls-use-mpegts                     Use the mpegts container for HLS
                                     videos, allowing to play the video
                                     while downloading (some players may not
                                     be able to play it)
--external-downloader COMMAND        Use the specified external downloader.
                                     Currently supports aria2c,avconv,axel,c
                                     url,ffmpeg,httpie,wget
--external-downloader-args ARGS      Give these arguments to the external
                                     downloader

Filesystem Options:

-a, --batch-file FILE                File containing URLs to download ('-'
                                     for stdin), one URL per line. Lines
                                     starting with '#', ';' or ']' are
                                     considered as comments and ignored.
--id                                 Use only video ID in file name
-o, --output TEMPLATE                Output filename template, see the
                                     "OUTPUT TEMPLATE" for all the info
--output-na-placeholder PLACEHOLDER  Placeholder value for unavailable meta
                                     fields in output filename template
                                     (default is "NA")
--autonumber-start NUMBER            Specify the start value for
                                     %(autonumber)s (default is 1)
--restrict-filenames                 Restrict filenames to only ASCII
                                     characters, and avoid "&" and spaces in
                                     filenames
-w, --no-overwrites                  Do not overwrite files
-c, --continue                       Force resume of partially downloaded
                                     files. By default, youtube-dl will
                                     resume downloads if possible.
--no-continue                        Do not resume partially downloaded
                                     files (restart from beginning)
--no-part                            Do not use .part files - write directly
                                     into output file
--no-mtime                           Do not use the Last-modified header to
                                     set the file modification time
--write-description                  Write video description to a
                                     .description file
--write-info-json                    Write video metadata to a .info.json
                                     file
--write-annotations                  Write video annotations to a
                                     .annotations.xml file
--load-info-json FILE                JSON file containing the video
                                     information (created with the "--write-
                                     info-json" option)
--cookies FILE                       File to read cookies from and dump
                                     cookie jar in
--cache-dir DIR                      Location in the filesystem where
                                     youtube-dl can store some downloaded
                                     information permanently. By default
                                     $XDG_CACHE_HOME/youtube-dl or
                                     ~/.cache/youtube-dl . At the moment,
                                     only YouTube player files (for videos
                                     with obfuscated signatures) are cached,
                                     but that may change.
--no-cache-dir                       Disable filesystem caching
--rm-cache-dir                       Delete all filesystem cache files

Thumbnail images:

--write-thumbnail                    Write thumbnail image to disk
--write-all-thumbnails               Write all thumbnail image formats to
                                     disk
--list-thumbnails                    Simulate and list all available
                                     thumbnail formats

Verbosity / Simulation Options:

-q, --quiet                          Activate quiet mode
--no-warnings                        Ignore warnings
-s, --simulate                       Do not download the video and do not
                                     write anything to disk
--skip-download                      Do not download the video
-g, --get-url                        Simulate, quiet but print URL
-e, --get-title                      Simulate, quiet but print title
--get-id                             Simulate, quiet but print id
--get-thumbnail                      Simulate, quiet but print thumbnail URL
--get-description                    Simulate, quiet but print video
                                     description
--get-duration                       Simulate, quiet but print video length
--get-filename                       Simulate, quiet but print output
                                     filename
--get-format                         Simulate, quiet but print output format
-j, --dump-json                      Simulate, quiet but print JSON
                                     information. See the "OUTPUT TEMPLATE"
                                     for a description of available keys.
-J, --dump-single-json               Simulate, quiet but print JSON
                                     information for each command-line
                                     argument. If the URL refers to a
                                     playlist, dump the whole playlist
                                     information in a single line.
--print-json                         Be quiet and print the video
                                     information as JSON (video is still
                                     being downloaded).
--newline                            Output progress bar as new lines
--no-progress                        Do not print progress bar
--console-title                      Display progress in console titlebar
-v, --verbose                        Print various debugging information
--dump-pages                         Print downloaded pages encoded using
                                     base64 to debug problems (very verbose)
--write-pages                        Write downloaded intermediary pages to
                                     files in the current directory to debug
                                     problems
--print-traffic                      Display sent and read HTTP traffic
-C, --call-home                      Contact the youtube-dl server for
                                     debugging
--no-call-home                       Do NOT contact the youtube-dl server
                                     for debugging

Workarounds:

--encoding ENCODING                  Force the specified encoding
                                     (experimental)
--no-check-certificate               Suppress HTTPS certificate validation
--prefer-insecure                    Use an unencrypted connection to
                                     retrieve information about the video.
                                     (Currently supported only for YouTube)
--user-agent UA                      Specify a custom user agent
--referer URL                        Specify a custom referer, use if the
                                     video access is restricted to one
                                     domain
--add-header FIELD:VALUE             Specify a custom HTTP header and its
                                     value, separated by a colon ':'. You
                                     can use this option multiple times
--bidi-workaround                    Work around terminals that lack
                                     bidirectional text support. Requires
                                     bidiv or fribidi executable in PATH
--sleep-interval SECONDS             Number of seconds to sleep before each
                                     download when used alone or a lower
                                     bound of a range for randomized sleep
                                     before each download (minimum possible
                                     number of seconds to sleep) when used
                                     along with --max-sleep-interval.
--max-sleep-interval SECONDS         Upper bound of a range for randomized
                                     sleep before each download (maximum
                                     possible number of seconds to sleep).
                                     Must only be used along with --min-
                                     sleep-interval.

Video Format Options:

-f, --format FORMAT                  Video format code, see the "FORMAT
                                     SELECTION" for all the info
--all-formats                        Download all available video formats
--prefer-free-formats                Prefer free video formats unless a
                                     specific one is requested
-F, --list-formats                   List all available formats of requested
                                     videos
--youtube-skip-dash-manifest         Do not download the DASH manifests and
                                     related data on YouTube videos
--merge-output-format FORMAT         If a merge is required (e.g.
                                     bestvideo+bestaudio), output to given
                                     container format. One of mkv, mp4, ogg,
                                     webm, flv. Ignored if no merge is
                                     required

Subtitle Options:

--write-sub                          Write subtitle file
--write-auto-sub                     Write automatically generated subtitle
                                     file (YouTube only)
--all-subs                           Download all the available subtitles of
                                     the video
--list-subs                          List all available subtitles for the
                                     video
--sub-format FORMAT                  Subtitle format, accepts formats
                                     preference, for example: "srt" or
                                     "ass/srt/best"
--sub-lang LANGS                     Languages of the subtitles to download
                                     (optional) separated by commas, use
                                     --list-subs for available language tags

Authentication Options:

-u, --username USERNAME              Login with this account ID
-p, --password PASSWORD              Account password. If this option is
                                     left out, youtube-dl will ask
                                     interactively.
-2, --twofactor TWOFACTOR            Two-factor authentication code
-n, --netrc                          Use .netrc authentication data
--video-password PASSWORD            Video password (vimeo, youku)

Adobe Pass Options:

--ap-mso MSO                         Adobe Pass multiple-system operator (TV
                                     provider) identifier, use --ap-list-mso
                                     for a list of available MSOs
--ap-username USERNAME               Multiple-system operator account login
--ap-password PASSWORD               Multiple-system operator account
                                     password. If this option is left out,
                                     youtube-dl will ask interactively.
--ap-list-mso                        List all supported multiple-system
                                     operators

Post-processing Options:

-x, --extract-audio                  Convert video files to audio-only files
                                     (requires ffmpeg/avconv and
                                     ffprobe/avprobe)
--audio-format FORMAT                Specify audio format: "best", "aac",
                                     "flac", "mp3", "m4a", "opus", "vorbis",
                                     or "wav"; "best" by default; No effect
                                     without -x
--audio-quality QUALITY              Specify ffmpeg/avconv audio quality,
                                     insert a value between 0 (better) and 9
                                     (worse) for VBR or a specific bitrate
                                     like 128K (default 5)
--recode-video FORMAT                Encode the video to another format if
                                     necessary (currently supported:
                                     mp4|flv|ogg|webm|mkv|avi)
--postprocessor-args ARGS            Give these arguments to the
                                     postprocessor
-k, --keep-video                     Keep the video file on disk after the
                                     post-processing; the video is erased by
                                     default
--no-post-overwrites                 Do not overwrite post-processed files;
                                     the post-processed files are
                                     overwritten by default
--embed-subs                         Embed subtitles in the video (only for
                                     mp4, webm and mkv videos)
--embed-thumbnail                    Embed thumbnail in the audio as cover
                                     art
--add-metadata                       Write metadata to the video file
--metadata-from-title FORMAT         Parse additional metadata like song
                                     title / artist from the video title.
                                     The format syntax is the same as
                                     --output. Regular expression with named
                                     capture groups may also be used. The
                                     parsed parameters replace existing
                                     values. Example: --metadata-from-title
                                     "%(artist)s - %(title)s" matches a
                                     title like "Coldplay - Paradise".
                                     Example (regex): --metadata-from-title
                                     "(?P.+?) - (?P.+)"
--xattrs                             Write metadata to the video file's
                                     xattrs (using dublin core and xdg
                                     standards)
--fixup POLICY                       Automatically correct known faults of
                                     the file. One of never (do nothing),
                                     warn (only emit a warning),
                                     detect_or_warn (the default; fix file
                                     if we can, warn otherwise)
--prefer-avconv                      Prefer avconv over ffmpeg for running
                                     the postprocessors
--prefer-ffmpeg                      Prefer ffmpeg over avconv for running
                                     the postprocessors (default)
--ffmpeg-location PATH               Location of the ffmpeg/avconv binary;
                                     either the path to the binary or its
                                     containing directory.
--exec CMD                           Execute a command on the file after
                                     downloading and post-processing,
                                     similar to find's -exec syntax.
                                     Example: --exec 'adb push {}
                                     /sdcard/Music/ && rm {}'
--convert-subs FORMAT                Convert the subtitles to other format
                                     (currently supported: srt|ass|vtt|lrc)
</code></pre> 
<h1><a id="user-content-configuration" class="anchor" aria-hidden="true" href="#configuration">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>CONFIGURATION</h1> 
<p>You can configure youtube-dl by placing any supported command line option to a configuration file. On Linux and macOS, the system wide configuration file is located at <code>/etc/youtube-dl.conf</code> and the user wide configuration file at <code>~/.config/youtube-dl/config</code>. On Windows, the user wide configuration file locations are <code>%APPDATA%\youtube-dl\config.txt</code> or <code>C:\Users\<user name>\youtube-dl.conf</code>. Note that by default configuration file may not exist so you may need to create it yourself.</p> 
<p>For example, with the following configuration file youtube-dl will always extract the audio, not copy the mtime, use a proxy and save all videos under <code>Movies</code> directory in your home directory:</p> 
<pre><code># Lines starting with # are comments

# Always extract audio
-x

# Do not copy the mtime
--no-mtime

# Use this proxy
--proxy 127.0.0.1:3128

# Save all videos under Movies directory in your home directory
-o ~/Movies/%(title)s.%(ext)s
</code></pre> 
<p>Note that options in configuration file are just the same options aka switches used in regular command line calls thus there <strong>must be no whitespace</strong> after <code>-</code> or <code>--</code>, e.g. <code>-o</code> or <code>--proxy</code> but not <code>- o</code> or <code>-- proxy</code>.</p> 
<p>You can use <code>--ignore-config</code> if you want to disable the configuration file for a particular youtube-dl run.</p> 
<p>You can also use <code>--config-location</code> if you want to use custom configuration file for a particular youtube-dl run.</p> 
<h3><a id="user-content-authentication-with-netrc-file" class="anchor" aria-hidden="true" href="#authentication-with-netrc-file">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Authentication with <code>.netrc</code> file</h3> 
<p>You may also want to configure automatic credentials storage for extractors that support authentication (by providing login and password with <code>--username</code> and <code>--password</code>) in order not to pass credentials as command line arguments on every youtube-dl execution and prevent tracking plain text passwords in the shell command history. You can achieve this using a <a href="https://stackoverflow.com/tags/.netrc/info" rel="nofollow"><code>.netrc</code> file</a> on a per extractor basis. For that you will need to create a <code>.netrc</code> file in your <code>$HOME</code> and restrict permissions to read/write by only you:</p> 
<pre><code>touch $HOME/.netrc
chmod a-rwx,u+rw $HOME/.netrc
</code></pre> 
<p>After that you can add credentials for an extractor in the following format, where <em>extractor</em> is the name of the extractor in lowercase:</p> 
<pre><code>machine <extractor> login <login> password <password>
</code></pre> 
<p>For example:</p> 
<pre><code>machine youtube login myaccount@gmail.com password my_youtube_password
machine twitch login my_twitch_account_name password my_twitch_password
</code></pre> 
<p>To activate authentication with the <code>.netrc</code> file you should pass <code>--netrc</code> to youtube-dl or place it in the <a href="#configuration">configuration file</a>.</p> 
<p>On Windows you may also need to setup the <code>%HOME%</code> environment variable manually. For example:</p> 
<pre><code>set HOME=%USERPROFILE%
</code></pre> 
<h1><a id="user-content-output-template" class="anchor" aria-hidden="true" href="#output-template">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>OUTPUT TEMPLATE</h1> 
<p>The <code>-o</code> option allows users to indicate a template for the output file names.</p> 
<p><strong>tl;dr:</strong> <a href="#output-template-examples">navigate me to examples</a>.</p> 
<p>The basic usage is not to set any template arguments when downloading a single file, like in <code>youtube-dl -o funny_video.flv "https://some/video"</code>. However, it may contain special sequences that will be replaced when downloading each video. The special sequences may be formatted according to <a href="https://docs.python.org/2/library/stdtypes.html#string-formatting" rel="nofollow">python string formatting operations</a>. For example, <code>%(NAME)s</code> or <code>%(NAME)05d</code>. To clarify, that is a percent symbol followed by a name in parentheses, followed by formatting operations. Allowed names along with sequence type are:</p> 
<ul> 
 <li><code>id</code> (string): Video identifier</li> 
 <li><code>title</code> (string): Video title</li> 
 <li><code>url</code> (string): Video URL</li> 
 <li><code>ext</code> (string): Video filename extension</li> 
 <li><code>alt_title</code> (string): A secondary title of the video</li> 
 <li><code>display_id</code> (string): An alternative identifier for the video</li> 
 <li><code>uploader</code> (string): Full name of the video uploader</li> 
 <li><code>license</code> (string): License name the video is licensed under</li> 
 <li><code>creator</code> (string): The creator of the video</li> 
 <li><code>release_date</code> (string): The date (YYYYMMDD) when the video was released</li> 
 <li><code>timestamp</code> (numeric): UNIX timestamp of the moment the video became available</li> 
 <li><code>upload_date</code> (string): Video upload date (YYYYMMDD)</li> 
 <li><code>uploader_id</code> (string): Nickname or id of the video uploader</li> 
 <li><code>channel</code> (string): Full name of the channel the video is uploaded on</li> 
 <li><code>channel_id</code> (string): Id of the channel</li> 
 <li><code>location</code> (string): Physical location where the video was filmed</li> 
 <li><code>duration</code> (numeric): Length of the video in seconds</li> 
 <li><code>view_count</code> (numeric): How many users have watched the video on the platform</li> 
 <li><code>like_count</code> (numeric): Number of positive ratings of the video</li> 
 <li><code>dislike_count</code> (numeric): Number of negative ratings of the video</li> 
 <li><code>repost_count</code> (numeric): Number of reposts of the video</li> 
 <li><code>average_rating</code> (numeric): Average rating give by users, the scale used depends on the webpage</li> 
 <li><code>comment_count</code> (numeric): Number of comments on the video</li> 
 <li><code>age_limit</code> (numeric): Age restriction for the video (years)</li> 
 <li><code>is_live</code> (boolean): Whether this video is a live stream or a fixed-length video</li> 
 <li><code>start_time</code> (numeric): Time in seconds where the reproduction should start, as specified in the URL</li> 
 <li><code>end_time</code> (numeric): Time in seconds where the reproduction should end, as specified in the URL</li> 
 <li><code>format</code> (string): A human-readable description of the format</li> 
 <li><code>format_id</code> (string): Format code specified by <code>--format</code></li> 
 <li><code>format_note</code> (string): Additional info about the format</li> 
 <li><code>width</code> (numeric): Width of the video</li> 
 <li><code>height</code> (numeric): Height of the video</li> 
 <li><code>resolution</code> (string): Textual description of width and height</li> 
 <li><code>tbr</code> (numeric): Average bitrate of audio and video in KBit/s</li> 
 <li><code>abr</code> (numeric): Average audio bitrate in KBit/s</li> 
 <li><code>acodec</code> (string): Name of the audio codec in use</li> 
 <li><code>asr</code> (numeric): Audio sampling rate in Hertz</li> 
 <li><code>vbr</code> (numeric): Average video bitrate in KBit/s</li> 
 <li><code>fps</code> (numeric): Frame rate</li> 
 <li><code>vcodec</code> (string): Name of the video codec in use</li> 
 <li><code>container</code> (string): Name of the container format</li> 
 <li><code>filesize</code> (numeric): The number of bytes, if known in advance</li> 
 <li><code>filesize_approx</code> (numeric): An estimate for the number of bytes</li> 
 <li><code>protocol</code> (string): The protocol that will be used for the actual download</li> 
 <li><code>extractor</code> (string): Name of the extractor</li> 
 <li><code>extractor_key</code> (string): Key name of the extractor</li> 
 <li><code>epoch</code> (numeric): Unix epoch when creating the file</li> 
 <li><code>autonumber</code> (numeric): Number that will be increased with each download, starting at <code>--autonumber-start</code></li> 
 <li><code>playlist</code> (string): Name or id of the playlist that contains the video</li> 
 <li><code>playlist_index</code> (numeric): Index of the video in the playlist padded with leading zeros according to the total length of the playlist</li> 
 <li><code>playlist_id</code> (string): Playlist identifier</li> 
 <li><code>playlist_title</code> (string): Playlist title</li> 
 <li><code>playlist_uploader</code> (string): Full name of the playlist uploader</li> 
 <li><code>playlist_uploader_id</code> (string): Nickname or id of the playlist uploader</li> 
</ul> 
<p>Available for the video that belongs to some logical chapter or section:</p> 
<ul> 
 <li><code>chapter</code> (string): Name or title of the chapter the video belongs to</li> 
 <li><code>chapter_number</code> (numeric): Number of the chapter the video belongs to</li> 
 <li><code>chapter_id</code> (string): Id of the chapter the video belongs to</li> 
</ul> 
<p>Available for the video that is an episode of some series or programme:</p> 
<ul> 
 <li><code>series</code> (string): Title of the series or programme the video episode belongs to</li> 
 <li><code>season</code> (string): Title of the season the video episode belongs to</li> 
 <li><code>season_number</code> (numeric): Number of the season the video episode belongs to</li> 
 <li><code>season_id</code> (string): Id of the season the video episode belongs to</li> 
 <li><code>episode</code> (string): Title of the video episode</li> 
 <li><code>episode_number</code> (numeric): Number of the video episode within a season</li> 
 <li><code>episode_id</code> (string): Id of the video episode</li> 
</ul> 
<p>Available for the media that is a track or a part of a music album:</p> 
<ul> 
 <li><code>track</code> (string): Title of the track</li> 
 <li><code>track_number</code> (numeric): Number of the track within an album or a disc</li> 
 <li><code>track_id</code> (string): Id of the track</li> 
 <li><code>artist</code> (string): Artist(s) of the track</li> 
 <li><code>genre</code> (string): Genre(s) of the track</li> 
 <li><code>album</code> (string): Title of the album the track belongs to</li> 
 <li><code>album_type</code> (string): Type of the album</li> 
 <li><code>album_artist</code> (string): List of all artists appeared on the album</li> 
 <li><code>disc_number</code> (numeric): Number of the disc or other physical medium the track belongs to</li> 
 <li><code>release_year</code> (numeric): Year (YYYY) when the album was released</li> 
</ul> 
<p>Each aforementioned sequence when referenced in an output template will be replaced by the actual value corresponding to the sequence name. Note that some of the sequences are not guaranteed to be present since they depend on the metadata obtained by a particular extractor. Such sequences will be replaced with placeholder value provided with <code>--output-na-placeholder</code> (<code>NA</code> by default).</p> 
<p>For example for <code>-o %(title)s-%(id)s.%(ext)s</code> and an mp4 video with title <code>youtube-dl test video</code> and id <code>BaW_jenozKcj</code>, this will result in a <code>youtube-dl test video-BaW_jenozKcj.mp4</code> file created in the current directory.</p> 
<p>For numeric sequences you can use numeric related formatting, for example, <code>%(view_count)05d</code> will result in a string with view count padded with zeros up to 5 characters, like in <code>00042</code>.</p> 
<p>Output templates can also contain arbitrary hierarchical path, e.g. <code>-o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'</code> which will result in downloading each video in a directory corresponding to this path template. Any missing directory will be automatically created for you.</p> 
<p>To use percent literals in an output template use <code>%%</code>. To output to stdout use <code>-o -</code>.</p> 
<p>The current default template is <code>%(title)s-%(id)s.%(ext)s</code>.</p> 
<p>In some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the <code>--restrict-filenames</code> flag to get a shorter title:</p> 
<h4><a id="user-content-output-template-and-windows-batch-files" class="anchor" aria-hidden="true" href="#output-template-and-windows-batch-files">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Output template and Windows batch files</h4> 
<p>If you are using an output template inside a Windows batch file then you must escape plain percent characters (<code>%</code>) by doubling, so that <code>-o "%(title)s-%(id)s.%(ext)s"</code> should become <code>-o "%%(title)s-%%(id)s.%%(ext)s"</code>. However you should not touch <code>%</code>'s that are not plain characters, e.g. environment variables for expansion should stay intact: <code>-o "C:\%HOMEPATH%\Desktop\%%(title)s.%%(ext)s"</code>.</p> 
<h4><a id="user-content-output-template-examples" class="anchor" aria-hidden="true" href="#output-template-examples">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Output template examples</h4> 
<p>Note that on Windows you may need to use double quotes instead of single.</p> 
<div class="highlight highlight-source-shell">
 <pre>$ youtube-dl --get-filename -o <span class="pl-s"><span class="pl-pds">'</span>%(title)s.%(ext)s<span class="pl-pds">'</span></span> BaW_jenozKc
youtube-dl <span class="pl-c1">test</span> video <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span>_ä↭𝕐.mp4    <span class="pl-c"><span class="pl-c">#</span> All kinds of weird characters</span>

$ youtube-dl --get-filename -o <span class="pl-s"><span class="pl-pds">'</span>%(title)s.%(ext)s<span class="pl-pds">'</span></span> BaW_jenozKc --restrict-filenames
youtube-dl_test_video_.mp4          <span class="pl-c"><span class="pl-c">#</span> A simple file name</span>

<span class="pl-c"><span class="pl-c">#</span> Download YouTube playlist videos in separate directory indexed by video order in a playlist</span>
$ youtube-dl -o <span class="pl-s"><span class="pl-pds">'</span>%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s<span class="pl-pds">'</span></span> https://www.youtube.com/playlist<span class="pl-k">?</span>list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re

<span class="pl-c"><span class="pl-c">#</span> Download all playlists of YouTube channel/user keeping each playlist in separate directory:</span>
$ youtube-dl -o <span class="pl-s"><span class="pl-pds">'</span>%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s<span class="pl-pds">'</span></span> https://www.youtube.com/user/TheLinuxFoundation/playlists

<span class="pl-c"><span class="pl-c">#</span> Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home</span>
$ youtube-dl -u user -p password -o <span class="pl-s"><span class="pl-pds">'</span>~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s<span class="pl-pds">'</span></span> https://www.udemy.com/java-tutorial/

<span class="pl-c"><span class="pl-c">#</span> Download entire series season keeping each series and each season in separate directory under C:/MyVideos</span>
$ youtube-dl -o <span class="pl-s"><span class="pl-pds">"</span>C:/MyVideos/%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s<span class="pl-pds">"</span></span> https://videomore.ru/kino_v_detalayah/5_sezon/367617

<span class="pl-c"><span class="pl-c">#</span> Stream the video being downloaded to stdout</span>
$ youtube-dl -o - BaW_jenozKc</pre>
</div> 
<h1><a id="user-content-format-selection" class="anchor" aria-hidden="true" href="#format-selection">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>FORMAT SELECTION</h1> 
<p>By default youtube-dl tries to download the best available quality, i.e. if you want the best quality you <strong>don't need</strong> to pass any special options, youtube-dl will guess it for you by <strong>default</strong>.</p> 
<p>But sometimes you may want to download in a different format, for example when you are on a slow or intermittent connection. The key mechanism for achieving this is so-called <em>format selection</em> based on which you can explicitly specify desired format, select formats based on some criterion or criteria, setup precedence and much more.</p> 
<p>The general syntax for format selection is <code>--format FORMAT</code> or shorter <code>-f FORMAT</code> where <code>FORMAT</code> is a <em>selector expression</em>, i.e. an expression that describes format or formats you would like to download.</p> 
<p><strong>tl;dr:</strong> <a href="#format-selection-examples">navigate me to examples</a>.</p> 
<p>The simplest case is requesting a specific format, for example with <code>-f 22</code> you can download the format with format code equal to 22. You can get the list of available format codes for particular video using <code>--list-formats</code> or <code>-F</code>. Note that these format codes are extractor specific.</p> 
<p>You can also use a file extension (currently <code>3gp</code>, <code>aac</code>, <code>flv</code>, <code>m4a</code>, <code>mp3</code>, <code>mp4</code>, <code>ogg</code>, <code>wav</code>, <code>webm</code> are supported) to download the best quality format of a particular file extension served as a single file, e.g. <code>-f webm</code> will download the best quality format with the <code>webm</code> extension served as a single file.</p> 
<p>You can also use special names to select particular edge case formats:</p> 
<ul> 
 <li><code>best</code>: Select the best quality format represented by a single file with video and audio.</li> 
 <li><code>worst</code>: Select the worst quality format represented by a single file with video and audio.</li> 
 <li><code>bestvideo</code>: Select the best quality video-only format (e.g. DASH video). May not be available.</li> 
 <li><code>worstvideo</code>: Select the worst quality video-only format. May not be available.</li> 
 <li><code>bestaudio</code>: Select the best quality audio only-format. May not be available.</li> 
 <li><code>worstaudio</code>: Select the worst quality audio only-format. May not be available.</li> 
</ul> 
<p>For example, to download the worst quality video-only format you can use <code>-f worstvideo</code>.</p> 
<p>If you want to download multiple videos and they don't have the same formats available, you can specify the order of preference using slashes. Note that slash is left-associative, i.e. formats on the left hand side are preferred, for example <code>-f 22/17/18</code> will download format 22 if it's available, otherwise it will download format 17 if it's available, otherwise it will download format 18 if it's available, otherwise it will complain that no suitable formats are available for download.</p> 
<p>If you want to download several formats of the same video use a comma as a separator, e.g. <code>-f 22,17,18</code> will download all these three formats, of course if they are available. Or a more sophisticated example combined with the precedence feature: <code>-f 136/137/mp4/bestvideo,140/m4a/bestaudio</code>.</p> 
<p>You can also filter the video formats by putting a condition in brackets, as in <code>-f "best[height=720]"</code> (or <code>-f "[filesize>10M]"</code>).</p> 
<p>The following numeric meta fields can be used with comparisons <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>=</code> (equals), <code>!=</code> (not equals):</p> 
<ul> 
 <li><code>filesize</code>: The number of bytes, if known in advance</li> 
 <li><code>width</code>: Width of the video, if known</li> 
 <li><code>height</code>: Height of the video, if known</li> 
 <li><code>tbr</code>: Average bitrate of audio and video in KBit/s</li> 
 <li><code>abr</code>: Average audio bitrate in KBit/s</li> 
 <li><code>vbr</code>: Average video bitrate in KBit/s</li> 
 <li><code>asr</code>: Audio sampling rate in Hertz</li> 
 <li><code>fps</code>: Frame rate</li> 
</ul> 
<p>Also filtering work for comparisons <code>=</code> (equals), <code>^=</code> (starts with), <code>$=</code> (ends with), <code>*=</code> (contains) and following string meta fields:</p> 
<ul> 
 <li><code>ext</code>: File extension</li> 
 <li><code>acodec</code>: Name of the audio codec in use</li> 
 <li><code>vcodec</code>: Name of the video codec in use</li> 
 <li><code>container</code>: Name of the container format</li> 
 <li><code>protocol</code>: The protocol that will be used for the actual download, lower-case (<code>http</code>, <code>https</code>, <code>rtsp</code>, <code>rtmp</code>, <code>rtmpe</code>, <code>mms</code>, <code>f4m</code>, <code>ism</code>, <code>http_dash_segments</code>, <code>m3u8</code>, or <code>m3u8_native</code>)</li> 
 <li><code>format_id</code>: A short description of the format</li> 
 <li><code>language</code>: Language code</li> 
</ul> 
<p>Any string comparison may be prefixed with negation <code>!</code> in order to produce an opposite comparison, e.g. <code>!*=</code> (does not contain).</p> 
<p>Note that none of the aforementioned meta fields are guaranteed to be present since this solely depends on the metadata obtained by particular extractor, i.e. the metadata offered by the video hoster.</p> 
<p>Formats for which the value is not known are excluded unless you put a question mark (<code>?</code>) after the operator. You can combine format filters, so <code>-f "[height <=? 720][tbr>500]"</code> selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit/s.</p> 
<p>You can merge the video and audio of two formats into a single file using <code>-f <video-format>+<audio-format></code> (requires ffmpeg or avconv installed), for example <code>-f bestvideo+bestaudio</code> will download the best video-only format, the best audio-only format and mux them together with ffmpeg/avconv.</p> 
<p>Format selectors can also be grouped using parentheses, for example if you want to download the best mp4 and webm formats with a height lower than 480 you can use <code>-f '(mp4,webm)[height<480]'</code>.</p> 
<p>Since the end of April 2015 and version 2015.04.26, youtube-dl uses <code>-f bestvideo+bestaudio/best</code> as the default format selection (see <a href="https://github.com/ytdl-org/youtube-dl/issues/5447">#5447</a>, <a href="https://github.com/ytdl-org/youtube-dl/issues/5456">#5456</a>). If ffmpeg or avconv are installed this results in downloading <code>bestvideo</code> and <code>bestaudio</code> separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to <code>best</code> and results in downloading the best available quality served as a single file. <code>best</code> is also needed for videos that don't come from YouTube because they don't provide the audio and video in two different files. If you want to only download some DASH formats (for example if you are not interested in getting videos with a resolution higher than 1080p), you can add <code>-f bestvideo[height<=?1080]+bestaudio/best</code> to your configuration file. Note that if you use youtube-dl to stream to <code>stdout</code> (and most likely to pipe it to your media player then), i.e. you explicitly specify output template as <code>-o -</code>, youtube-dl still uses <code>-f best</code> format selection in order to start content delivery immediately to your player and not to wait until <code>bestvideo</code> and <code>bestaudio</code> are downloaded and muxed.</p> 
<p>If you want to preserve the old format selection behavior (prior to youtube-dl 2015.04.26), i.e. you want to download the best available quality media served as a single file, you should explicitly specify your choice with <code>-f best</code>. You may want to add it to the <a href="#configuration">configuration file</a> in order not to type it every time you run youtube-dl.</p> 
<h4><a id="user-content-format-selection-examples" class="anchor" aria-hidden="true" href="#format-selection-examples">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Format selection examples</h4> 
<p>Note that on Windows you may need to use double quotes instead of single.</p> 
<div class="highlight highlight-source-shell">
 <pre><span class="pl-c"><span class="pl-c">#</span> Download best mp4 format available or any other best if no mp4 available</span>
$ youtube-dl -f <span class="pl-s"><span class="pl-pds">'</span>bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best<span class="pl-pds">'</span></span>

<span class="pl-c"><span class="pl-c">#</span> Download best format available but no better than 480p</span>
$ youtube-dl -f <span class="pl-s"><span class="pl-pds">'</span>bestvideo[height<=480]+bestaudio/best[height<=480]<span class="pl-pds">'</span></span>

<span class="pl-c"><span class="pl-c">#</span> Download best video only format but no bigger than 50 MB</span>
$ youtube-dl -f <span class="pl-s"><span class="pl-pds">'</span>best[filesize<50M]<span class="pl-pds">'</span></span>

<span class="pl-c"><span class="pl-c">#</span> Download best format available via direct link over HTTP/HTTPS protocol</span>
$ youtube-dl -f <span class="pl-s"><span class="pl-pds">'</span>(bestvideo+bestaudio/best)[protocol^=http]<span class="pl-pds">'</span></span>

<span class="pl-c"><span class="pl-c">#</span> Download the best video format and the best audio format without merging them</span>
$ youtube-dl -f <span class="pl-s"><span class="pl-pds">'</span>bestvideo,bestaudio<span class="pl-pds">'</span></span> -o <span class="pl-s"><span class="pl-pds">'</span>%(title)s.f%(format_id)s.%(ext)s<span class="pl-pds">'</span></span></pre>
</div> 
<p>Note that in the last example, an output template is recommended as bestvideo and bestaudio may have the same file name.</p> 
<h1><a id="user-content-video-selection-1" class="anchor" aria-hidden="true" href="#video-selection-1">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>VIDEO SELECTION</h1> 
<p>Videos can be filtered by their upload date using the options <code>--date</code>, <code>--datebefore</code> or <code>--dateafter</code>. They accept dates in two formats:</p> 
<ul> 
 <li>Absolute dates: Dates in the format <code>YYYYMMDD</code>.</li> 
 <li>Relative dates: Dates in the format <code>(now|today)[+-][0-9](day|week|month|year)(s)?</code></li> 
</ul> 
<p>Examples:</p> 
<div class="highlight highlight-source-shell">
 <pre><span class="pl-c"><span class="pl-c">#</span> Download only the videos uploaded in the last 6 months</span>
$ youtube-dl --dateafter now-6months

<span class="pl-c"><span class="pl-c">#</span> Download only the videos uploaded on January 1, 1970</span>
$ youtube-dl --date 19700101

$ <span class="pl-c"><span class="pl-c">#</span> Download only the videos uploaded in the 200x decade</span>
$ youtube-dl --dateafter 20000101 --datebefore 20091231</pre>
</div> 
<h1><a id="user-content-faq" class="anchor" aria-hidden="true" href="#faq">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>FAQ</h1> 
<h3><a id="user-content-how-do-i-update-youtube-dl" class="anchor" aria-hidden="true" href="#how-do-i-update-youtube-dl">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How do I update youtube-dl?</h3> 
<p>If you've followed <a href="https://ytdl-org.github.io/youtube-dl/download.html" rel="nofollow">our manual installation instructions</a>, you can simply run <code>youtube-dl -U</code> (or, on Linux, <code>sudo youtube-dl -U</code>).</p> 
<p>If you have used pip, a simple <code>sudo pip install -U youtube-dl</code> is sufficient to update.</p> 
<p>If you have installed youtube-dl using a package manager like <em>apt-get</em> or <em>yum</em>, use the standard system update mechanism to update. Note that distribution packages are often outdated. As a rule of thumb, youtube-dl releases at least once a month, and often weekly or even daily. Simply go to <a href="https://yt-dl.org" rel="nofollow">https://yt-dl.org</a> to find out the current version. Unfortunately, there is nothing we youtube-dl developers can do if your distribution serves a really outdated version. You can (and should) complain to your distribution in their bugtracker or support forum.</p> 
<p>As a last resort, you can also uninstall the version installed by your package manager and follow our manual installation instructions. For that, remove the distribution's package, with a line like</p> 
<pre><code>sudo apt-get remove -y youtube-dl
</code></pre> 
<p>Afterwards, simply follow <a href="https://ytdl-org.github.io/youtube-dl/download.html" rel="nofollow">our manual installation instructions</a>:</p> 
<pre><code>sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
hash -r
</code></pre> 
<p>Again, from then on you'll be able to update with <code>sudo youtube-dl -U</code>.</p> 
<h3><a id="user-content-youtube-dl-is-extremely-slow-to-start-on-windows" class="anchor" aria-hidden="true" href="#youtube-dl-is-extremely-slow-to-start-on-windows">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>youtube-dl is extremely slow to start on Windows</h3> 
<p>Add a file exclusion for <code>youtube-dl.exe</code> in Windows Defender settings.</p> 
<h3><a id="user-content-im-getting-an-error-unable-to-extract-opengraph-title-on-youtube-playlists" class="anchor" aria-hidden="true" href="#im-getting-an-error-unable-to-extract-opengraph-title-on-youtube-playlists">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>I'm getting an error <code>Unable to extract OpenGraph title</code> on YouTube playlists</h3> 
<p>YouTube changed their playlist format in March 2014 and later on, so you'll need at least youtube-dl 2014.07.25 to download all YouTube videos.</p> 
<p>If you have installed youtube-dl with a package manager, pip, setup.py or a tarball, please use that to update. Note that Ubuntu packages do not seem to get updated anymore. Since we are not affiliated with Ubuntu, there is little we can do. Feel free to <a href="https://bugs.launchpad.net/ubuntu/+source/youtube-dl/+filebug" rel="nofollow">report bugs</a> to the <a href="mailto:ubuntu-motu@lists.ubuntu.com?subject=outdated%20version%20of%20youtube-dl">Ubuntu packaging people</a> - all they have to do is update the package to a somewhat recent version. See above for a way to update.</p> 
<h3><a id="user-content-im-getting-an-error-when-trying-to-use-output-template-error-using-output-template-conflicts-with-using-title-video-id-or-auto-number" class="anchor" aria-hidden="true" href="#im-getting-an-error-when-trying-to-use-output-template-error-using-output-template-conflicts-with-using-title-video-id-or-auto-number">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>I'm getting an error when trying to use output template: <code>error: using output template conflicts with using title, video ID or auto number</code></h3> 
<p>Make sure you are not using <code>-o</code> with any of these options <code>-t</code>, <code>--title</code>, <code>--id</code>, <code>-A</code> or <code>--auto-number</code> set in command line or in a configuration file. Remove the latter if any.</p> 
<h3><a id="user-content-do-i-always-have-to-pass--citw" class="anchor" aria-hidden="true" href="#do-i-always-have-to-pass--citw">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Do I always have to pass <code>-citw</code>?</h3> 
<p>By default, youtube-dl intends to have the best options (incidentally, if you have a convincing case that these should be different, <a href="https://yt-dl.org/bug" rel="nofollow">please file an issue where you explain that</a>). Therefore, it is unnecessary and sometimes harmful to copy long option strings from webpages. In particular, the only option out of <code>-citw</code> that is regularly useful is <code>-i</code>.</p> 
<h3><a id="user-content-can-you-please-put-the--b-option-back" class="anchor" aria-hidden="true" href="#can-you-please-put-the--b-option-back">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Can you please put the <code>-b</code> option back?</h3> 
<p>Most people asking this question are not aware that youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases, so you no longer need the <code>-b</code> option. For some specific videos, maybe YouTube does not report them to be available in a specific high quality format you're interested in. In that case, simply request it with the <code>-f</code> option and youtube-dl will try to download it.</p> 
<h3><a id="user-content-i-get-http-error-402-when-trying-to-download-a-video-whats-this" class="anchor" aria-hidden="true" href="#i-get-http-error-402-when-trying-to-download-a-video-whats-this">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>I get HTTP error 402 when trying to download a video. What's this?</h3> 
<p>Apparently YouTube requires you to pass a CAPTCHA test if you download too much. We're <a href="https://github.com/ytdl-org/youtube-dl/issues/154">considering to provide a way to let you solve the CAPTCHA</a>, but at the moment, your best course of action is pointing a web browser to the youtube URL, solving the CAPTCHA, and restart youtube-dl.</p> 
<h3><a id="user-content-do-i-need-any-other-programs" class="anchor" aria-hidden="true" href="#do-i-need-any-other-programs">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Do I need any other programs?</h3> 
<p>youtube-dl works fine on its own on most sites. However, if you want to convert video/audio, you'll need <a href="https://libav.org/" rel="nofollow">avconv</a> or <a href="https://www.ffmpeg.org/" rel="nofollow">ffmpeg</a>. On some sites - most notably YouTube - videos can be retrieved in a higher quality format without sound. youtube-dl will detect whether avconv/ffmpeg is present and automatically pick the best option.</p> 
<p>Videos or video formats streamed via RTMP protocol can only be downloaded when <a href="https://rtmpdump.mplayerhq.hu/" rel="nofollow">rtmpdump</a> is installed. Downloading MMS and RTSP videos requires either <a href="https://mplayerhq.hu/" rel="nofollow">mplayer</a> or <a href="https://mpv.io/" rel="nofollow">mpv</a> to be installed.</p> 
<h3><a id="user-content-i-have-downloaded-a-video-but-how-can-i-play-it" class="anchor" aria-hidden="true" href="#i-have-downloaded-a-video-but-how-can-i-play-it">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>I have downloaded a video but how can I play it?</h3> 
<p>Once the video is fully downloaded, use any video player, such as <a href="https://mpv.io/" rel="nofollow">mpv</a>, <a href="https://www.videolan.org/" rel="nofollow">vlc</a> or <a href="https://www.mplayerhq.hu/" rel="nofollow">mplayer</a>.</p> 
<h3><a id="user-content-i-extracted-a-video-url-with--g-but-it-does-not-play-on-another-machine--in-my-web-browser" class="anchor" aria-hidden="true" href="#i-extracted-a-video-url-with--g-but-it-does-not-play-on-another-machine--in-my-web-browser">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>I extracted a video URL with <code>-g</code>, but it does not play on another machine / in my web browser.</h3> 
<p>It depends a lot on the service. In many cases, requests for the video (to download/play it) must come from the same IP address and with the same cookies and/or HTTP headers. Use the <code>--cookies</code> option to write the required cookies into a file, and advise your downloader to read cookies from that file. Some sites also require a common user agent to be used, use <code>--dump-user-agent</code> to see the one in use by youtube-dl. You can also get necessary cookies and HTTP headers from JSON output obtained with <code>--dump-json</code>.</p> 
<p>It may be beneficial to use IPv6; in some cases, the restrictions are only applied to IPv4. Some services (sometimes only for a subset of videos) do not restrict the video URL by IP address, cookie, or user-agent, but these are the exception rather than the rule.</p> 
<p>Please bear in mind that some URL protocols are <strong>not</strong> supported by browsers out of the box, including RTMP. If you are using <code>-g</code>, your own downloader must support these as well.</p> 
<p>If you want to play the video on a machine that is not running youtube-dl, you can relay the video content from the machine that runs youtube-dl. You can use <code>-o -</code> to let youtube-dl stream a video to stdout, or simply allow the player to download the files written by youtube-dl in turn.</p> 
<h3><a id="user-content-error-no-fmt_url_map-or-conn-information-found-in-video-info" class="anchor" aria-hidden="true" href="#error-no-fmt_url_map-or-conn-information-found-in-video-info">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>ERROR: no fmt_url_map or conn information found in video info</h3> 
<p>YouTube has switched to a new video info format in July 2011 which is not supported by old versions of youtube-dl. See <a href="#how-do-i-update-youtube-dl">above</a> for how to update youtube-dl.</p> 
<h3><a id="user-content-error-unable-to-download-video" class="anchor" aria-hidden="true" href="#error-unable-to-download-video">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>ERROR: unable to download video</h3> 
<p>YouTube requires an additional signature since September 2012 which is not supported by old versions of youtube-dl. See <a href="#how-do-i-update-youtube-dl">above</a> for how to update youtube-dl.</p> 
<h3><a id="user-content-video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command" class="anchor" aria-hidden="true" href="#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Video URL contains an ampersand and I'm getting some strange output <code>[1] 2839</code> or <code>'v' is not recognized as an internal or external command</code></h3> 
<p>That's actually the output from your shell. Since ampersand is one of the special shell characters it's interpreted by the shell preventing you from passing the whole URL to youtube-dl. To disable your shell from interpreting the ampersands (or any other special characters) you have to either put the whole URL in quotes or escape them with a backslash (which approach will work depends on your shell).</p> 
<p>For example if your URL is <a href="https://www.youtube.com/watch?t=4&v=BaW_jenozKc" rel="nofollow">https://www.youtube.com/watch?t=4&v=BaW_jenozKc</a> you should end up with following command:</p> 
<p><code>youtube-dl 'https://www.youtube.com/watch?t=4&v=BaW_jenozKc'</code></p> 
<p>or</p> 
<p><code>youtube-dl https://www.youtube.com/watch?t=4\&v=BaW_jenozKc</code></p> 
<p>For Windows you have to use the double quotes:</p> 
<p><code>youtube-dl "https://www.youtube.com/watch?t=4&v=BaW_jenozKc"</code></p> 
<h3><a id="user-content-extractorerror-could-not-find-js-function-uof" class="anchor" aria-hidden="true" href="#extractorerror-could-not-find-js-function-uof">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>ExtractorError: Could not find JS function u'OF'</h3> 
<p>In February 2015, the new YouTube player contained a character sequence in a string that was misinterpreted by old versions of youtube-dl. See <a href="#how-do-i-update-youtube-dl">above</a> for how to update youtube-dl.</p> 
<h3><a id="user-content-http-error-429-too-many-requests-or-402-payment-required" class="anchor" aria-hidden="true" href="#http-error-429-too-many-requests-or-402-payment-required">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>HTTP Error 429: Too Many Requests or 402: Payment Required</h3> 
<p>These two error codes indicate that the service is blocking your IP address because of overuse. Usually this is a soft block meaning that you can gain access again after solving CAPTCHA. Just open a browser and solve a CAPTCHA the service suggests you and after that <a href="#how-do-i-pass-cookies-to-youtube-dl">pass cookies</a> to youtube-dl. Note that if your machine has multiple external IPs then you should also pass exactly the same IP you've used for solving CAPTCHA with <a href="#network-options"><code>--source-address</code></a>. Also you may need to pass a <code>User-Agent</code> HTTP header of your browser with <a href="#workarounds"><code>--user-agent</code></a>.</p> 
<p>If this is not the case (no CAPTCHA suggested to solve by the service) then you can contact the service and ask them to unblock your IP address, or - if you have acquired a whitelisted IP address already - use the <a href="#network-options"><code>--proxy</code> or <code>--source-address</code> options</a> to select another IP address.</p> 
<h3><a id="user-content-syntaxerror-non-ascii-character" class="anchor" aria-hidden="true" href="#syntaxerror-non-ascii-character">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>SyntaxError: Non-ASCII character</h3> 
<p>The error</p> 
<pre><code>File "youtube-dl", line 2
SyntaxError: Non-ASCII character '\x93' ...
</code></pre> 
<p>means you're using an outdated version of Python. Please update to Python 2.6 or 2.7.</p> 
<h3><a id="user-content-what-is-this-binary-file-where-has-the-code-gone" class="anchor" aria-hidden="true" href="#what-is-this-binary-file-where-has-the-code-gone">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>What is this binary file? Where has the code gone?</h3> 
<p>Since June 2012 (<a href="https://github.com/ytdl-org/youtube-dl/issues/342">#342</a>) youtube-dl is packed as an executable zipfile, simply unzip it (might need renaming to <code>youtube-dl.zip</code> first on some systems) or clone the git repository, as laid out above. If you modify the code, you can run it by executing the <code>__main__.py</code> file. To recompile the executable, run <code>make youtube-dl</code>.</p> 
<h3><a id="user-content-the-exe-throws-an-error-due-to-missing-msvcr100dll" class="anchor" aria-hidden="true" href="#the-exe-throws-an-error-due-to-missing-msvcr100dll">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>The exe throws an error due to missing <code>MSVCR100.dll</code></h3> 
<p>To run the exe you need to install first the <a href="https://www.microsoft.com/en-US/download/details.aspx?id=5555" rel="nofollow">Microsoft Visual C++ 2010 Redistributable Package (x86)</a>.</p> 
<h3><a id="user-content-on-windows-how-should-i-set-up-ffmpeg-and-youtube-dl-where-should-i-put-the-exe-files" class="anchor" aria-hidden="true" href="#on-windows-how-should-i-set-up-ffmpeg-and-youtube-dl-where-should-i-put-the-exe-files">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>On Windows, how should I set up ffmpeg and youtube-dl? Where should I put the exe files?</h3> 
<p>If you put youtube-dl and ffmpeg in the same directory that you're running the command from, it will work, but that's rather cumbersome.</p> 
<p>To make a different directory work - either for ffmpeg, or for youtube-dl, or for both - simply create the directory (say, <code>C:\bin</code>, or <code>C:\Users\<User name>\bin</code>), put all the executables directly in there, and then <a href="https://www.java.com/en/download/help/path.xml" rel="nofollow">set your PATH environment variable</a> to include that directory.</p> 
<p>From then on, after restarting your shell, you will be able to access both youtube-dl and ffmpeg (and youtube-dl will be able to find ffmpeg) by simply typing <code>youtube-dl</code> or <code>ffmpeg</code>, no matter what directory you're in.</p> 
<h3><a id="user-content-how-do-i-put-downloads-into-a-specific-folder" class="anchor" aria-hidden="true" href="#how-do-i-put-downloads-into-a-specific-folder">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How do I put downloads into a specific folder?</h3> 
<p>Use the <code>-o</code> to specify an <a href="#output-template">output template</a>, for example <code>-o "/home/user/videos/%(title)s-%(id)s.%(ext)s"</code>. If you want this for all of your downloads, put the option into your <a href="#configuration">configuration file</a>.</p> 
<h3><a id="user-content-how-do-i-download-a-video-starting-with-a--" class="anchor" aria-hidden="true" href="#how-do-i-download-a-video-starting-with-a--">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How do I download a video starting with a <code>-</code>?</h3> 
<p>Either prepend <code>https://www.youtube.com/watch?v=</code> or separate the ID from the options with <code>--</code>:</p> 
<pre><code>youtube-dl -- -wNyEUrxzFU
youtube-dl "https://www.youtube.com/watch?v=-wNyEUrxzFU"
</code></pre> 
<h3><a id="user-content-how-do-i-pass-cookies-to-youtube-dl" class="anchor" aria-hidden="true" href="#how-do-i-pass-cookies-to-youtube-dl">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How do I pass cookies to youtube-dl?</h3> 
<p>Use the <code>--cookies</code> option, for example <code>--cookies /path/to/cookies/file.txt</code>.</p> 
<p>In order to extract cookies from browser use any conforming browser extension for exporting cookies. For example, <a href="https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid/" rel="nofollow">Get cookies.txt</a> (for Chrome) or <a href="https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/" rel="nofollow">cookies.txt</a> (for Firefox).</p> 
<p>Note that the cookies file must be in Mozilla/Netscape format and the first line of the cookies file must be either <code># HTTP Cookie File</code> or <code># Netscape HTTP Cookie File</code>. Make sure you have correct <a href="https://en.wikipedia.org/wiki/Newline" rel="nofollow">newline format</a> in the cookies file and convert newlines if necessary to correspond with your OS, namely <code>CRLF</code> (<code>\r\n</code>) for Windows and <code>LF</code> (<code>\n</code>) for Unix and Unix-like systems (Linux, macOS, etc.). <code>HTTP Error 400: Bad Request</code> when using <code>--cookies</code> is a good sign of invalid newline format.</p> 
<p>Passing cookies to youtube-dl is a good way to workaround login when a particular extractor does not implement it explicitly. Another use case is working around <a href="https://en.wikipedia.org/wiki/CAPTCHA" rel="nofollow">CAPTCHA</a> some websites require you to solve in particular cases in order to get access (e.g. YouTube, CloudFlare).</p> 
<h3><a id="user-content-how-do-i-stream-directly-to-media-player" class="anchor" aria-hidden="true" href="#how-do-i-stream-directly-to-media-player">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How do I stream directly to media player?</h3> 
<p>You will first need to tell youtube-dl to stream media to stdout with <code>-o -</code>, and also tell your media player to read from stdin (it must be capable of this for streaming) and then pipe former to latter. For example, streaming to <a href="https://www.videolan.org/" rel="nofollow">vlc</a> can be achieved with:</p> 
<pre><code>youtube-dl -o - "https://www.youtube.com/watch?v=BaW_jenozKcj" | vlc -
</code></pre> 
<h3><a id="user-content-how-do-i-download-only-new-videos-from-a-playlist" class="anchor" aria-hidden="true" href="#how-do-i-download-only-new-videos-from-a-playlist">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How do I download only new videos from a playlist?</h3> 
<p>Use download-archive feature. With this feature you should initially download the complete playlist with <code>--download-archive /path/to/download/archive/file.txt</code> that will record identifiers of all the videos in a special file. Each subsequent run with the same <code>--download-archive</code> will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.</p> 
<p>For example, at first,</p> 
<pre><code>youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"
</code></pre> 
<p>will download the complete <code>PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re</code> playlist and create a file <code>archive.txt</code>. Each subsequent run will only download new videos if any:</p> 
<pre><code>youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"
</code></pre> 
<h3><a id="user-content-should-i-add---hls-prefer-native-into-my-config" class="anchor" aria-hidden="true" href="#should-i-add---hls-prefer-native-into-my-config">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Should I add <code>--hls-prefer-native</code> into my config?</h3> 
<p>When youtube-dl detects an HLS video, it can download it either with the built-in downloader or ffmpeg. Since many HLS streams are slightly invalid and ffmpeg/youtube-dl each handle some invalid cases better than the other, there is an option to switch the downloader if needed.</p> 
<p>When youtube-dl knows that one particular downloader works better for a given website, that downloader will be picked. Otherwise, youtube-dl will pick the best downloader for general compatibility, which at the moment happens to be ffmpeg. This choice may change in future versions of youtube-dl, with improvements of the built-in downloader and/or ffmpeg.</p> 
<p>In particular, the generic extractor (used when your website is not in the <a href="https://ytdl-org.github.io/youtube-dl/supportedsites.html" rel="nofollow">list of supported sites by youtube-dl</a> cannot mandate one specific downloader.</p> 
<p>If you put either <code>--hls-prefer-native</code> or <code>--hls-prefer-ffmpeg</code> into your configuration, a different subset of videos will fail to download correctly. Instead, it is much better to <a href="https://yt-dl.org/bug" rel="nofollow">file an issue</a> or a pull request which details why the native or the ffmpeg HLS downloader is a better choice for your use case.</p> 
<h3><a id="user-content-can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free" class="anchor" aria-hidden="true" href="#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Can you add support for this anime video site, or site which shows current movies for free?</h3> 
<p>As a matter of policy (as well as legality), youtube-dl does not include support for services that specialize in infringing copyright. As a rule of thumb, if you cannot easily find a video that the service is quite obviously allowed to distribute (i.e. that has been uploaded by the creator, the creator's distributor, or is published under a free license), the service is probably unfit for inclusion to youtube-dl.</p> 
<p>A note on the service that they don't host the infringing content, but just link to those who do, is evidence that the service should <strong>not</strong> be included into youtube-dl. The same goes for any DMCA note when the whole front page of the service is filled with videos they are not allowed to distribute. A "fair use" note is equally unconvincing if the service shows copyright-protected videos in full without authorization.</p> 
<p>Support requests for services that <strong>do</strong> purchase the rights to distribute their content are perfectly fine though. If in doubt, you can simply include a source that mentions the legitimate purchase of content.</p> 
<h3><a id="user-content-how-can-i-speed-up-work-on-my-issue" class="anchor" aria-hidden="true" href="#how-can-i-speed-up-work-on-my-issue">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How can I speed up work on my issue?</h3> 
<p>(Also known as: Help, my important issue not being solved!) The youtube-dl core developer team is quite small. While we do our best to solve as many issues as possible, sometimes that can take quite a while. To speed up your issue, here's what you can do:</p> 
<p>First of all, please do report the issue <a href="https://yt-dl.org/bugs" rel="nofollow">at our issue tracker</a>. That allows us to coordinate all efforts by users and developers, and serves as a unified point. Unfortunately, the youtube-dl project has grown too large to use personal email as an effective communication channel.</p> 
<p>Please read the <a href="#bugs">bug reporting instructions</a> below. A lot of bugs lack all the necessary information. If you can, offer proxy, VPN, or shell access to the youtube-dl developers. If you are able to, test the issue from multiple computers in multiple countries to exclude local censorship or misconfiguration issues.</p> 
<p>If nobody is interested in solving your issue, you are welcome to take matters into your own hands and submit a pull request (or coerce/pay somebody else to do so).</p> 
<p>Feel free to bump the issue from time to time by writing a small comment ("Issue is still present in youtube-dl version ...from France, but fixed from Belgium"), but please not more than once a month. Please do not declare your issue as <code>important</code> or <code>urgent</code>.</p> 
<h3><a id="user-content-how-can-i-detect-whether-a-given-url-is-supported-by-youtube-dl" class="anchor" aria-hidden="true" href="#how-can-i-detect-whether-a-given-url-is-supported-by-youtube-dl">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>How can I detect whether a given URL is supported by youtube-dl?</h3> 
<p>For one, have a look at the <a href="/ytdl-org/youtube-dl/blob/master/docs/supportedsites.md">list of supported sites</a>. Note that it can sometimes happen that the site changes its URL scheme (say, from <a href="https://example.com/video/1234567" rel="nofollow">https://example.com/video/1234567</a> to <a href="https://example.com/v/1234567" rel="nofollow">https://example.com/v/1234567</a> ) and youtube-dl reports an URL of a service in that list as unsupported. In that case, simply report a bug.</p> 
<p>It is <em>not</em> possible to detect whether a URL is supported or not. That's because youtube-dl contains a generic extractor which matches <strong>all</strong> URLs. You may be tempted to disable, exclude, or remove the generic extractor, but the generic extractor not only allows users to extract videos from lots of websites that embed a video from another service, but may also be used to extract video from a service that it's hosting itself. Therefore, we neither recommend nor support disabling, excluding, or removing the generic extractor.</p> 
<p>If you want to find out whether a given URL is supported, simply call youtube-dl with it. If you get no videos back, chances are the URL is either not referring to a video or unsupported. You can find out which by examining the output (if you run youtube-dl on the console) or catching an <code>UnsupportedError</code> exception if you run it from a Python program.</p> 
<h1><a id="user-content-why-do-i-need-to-go-through-that-much-red-tape-when-filing-bugs" class="anchor" aria-hidden="true" href="#why-do-i-need-to-go-through-that-much-red-tape-when-filing-bugs">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Why do I need to go through that much red tape when filing bugs?</h1> 
<p>Before we had the issue template, despite our extensive <a href="#bugs">bug reporting instructions</a>, about 80% of the issue reports we got were useless, for instance because people used ancient versions hundreds of releases old, because of simple syntactic errors (not in youtube-dl but in general shell usage), because the problem was already reported multiple times before, because people did not actually read an error message, even if it said "please install ffmpeg", because people did not mention the URL they were trying to download and many more simple, easy-to-avoid problems, many of whom were totally unrelated to youtube-dl.</p> 
<p>youtube-dl is an open-source project manned by too few volunteers, so we'd rather spend time fixing bugs where we are certain none of those simple problems apply, and where we can be reasonably confident to be able to reproduce the issue without asking the reporter repeatedly. As such, the output of <code>youtube-dl -v YOUR_URL_HERE</code> is really all that's required to file an issue. The issue template also guides you through some basic steps you can do, such as checking that your version of youtube-dl is current.</p> 
<h1><a id="user-content-developer-instructions" class="anchor" aria-hidden="true" href="#developer-instructions">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>DEVELOPER INSTRUCTIONS</h1> 
<p>Most users do not need to build youtube-dl and can <a href="https://ytdl-org.github.io/youtube-dl/download.html" rel="nofollow">download the builds</a> or get them from their distribution.</p> 
<p>To run youtube-dl as a developer, you don't need to build anything either. Simply execute</p> 
<pre><code>python -m youtube_dl
</code></pre> 
<p>To run the test, simply invoke your favorite test runner, or execute a test file directly; any of the following work:</p> 
<pre><code>python -m unittest discover
python test/test_download.py
nosetests
</code></pre> 
<p>See item 6 of <a href="#adding-support-for-a-new-site">new extractor tutorial</a> for how to run extractor specific test cases.</p> 
<p>If you want to create a build of youtube-dl yourself, you'll need</p> 
<ul> 
 <li>python</li> 
 <li>make (only GNU make is supported)</li> 
 <li>pandoc</li> 
 <li>zip</li> 
 <li>nosetests</li> 
</ul> 
<h3><a id="user-content-adding-support-for-a-new-site" class="anchor" aria-hidden="true" href="#adding-support-for-a-new-site">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Adding support for a new site</h3> 
<p>If you want to add support for a new site, first of all <strong>make sure</strong> this site is <strong>not dedicated to <a href="/ytdl-org/youtube-dl/blob/master/README.md#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free">copyright infringement</a></strong>. youtube-dl does <strong>not support</strong> such sites thus pull requests adding support for them <strong>will be rejected</strong>.</p> 
<p>After you have ensured this site is distributing its content legally, you can follow this quick list (assuming your service is called <code>yourextractor</code>):</p> 
<ol> 
 <li> <p><a href="https://github.com/ytdl-org/youtube-dl/fork">Fork this repository</a></p> </li> 
 <li> <p>Check out the source code with:</p> <pre><code> git clone git@github.com:YOUR_GITHUB_USERNAME/youtube-dl.git
</code></pre> </li> 
 <li> <p>Start a new git branch with</p> <pre><code> cd youtube-dl
 git checkout -b yourextractor
</code></pre> </li> 
 <li> <p>Start with this simple template and save it to <code>youtube_dl/extractor/yourextractor.py</code>:</p> 
  <div class="highlight highlight-source-python">
   <pre><span class="pl-c"># coding: utf-8</span>
<span class="pl-k">from</span> __future__ <span class="pl-k">import</span> <span class="pl-s1">unicode_literals</span>

<span class="pl-k">from</span> .<span class="pl-s1">common</span> <span class="pl-k">import</span> <span class="pl-v">InfoExtractor</span>


<span class="pl-k">class</span> <span class="pl-v">YourExtractorIE</span>(<span class="pl-v">InfoExtractor</span>):
    <span class="pl-s1">_VALID_URL</span> <span class="pl-c1">=</span> <span class="pl-s">r'https?://(?:www\.)?yourextractor\.com/watch/(?P<id>[0-9]+)'</span>
    <span class="pl-s1">_TEST</span> <span class="pl-c1">=</span> {
        <span class="pl-s">'url'</span>: <span class="pl-s">'https://yourextractor.com/watch/42'</span>,
        <span class="pl-s">'md5'</span>: <span class="pl-s">'TODO: md5 sum of the first 10241 bytes of the video file (use --test)'</span>,
        <span class="pl-s">'info_dict'</span>: {
            <span class="pl-s">'id'</span>: <span class="pl-s">'42'</span>,
            <span class="pl-s">'ext'</span>: <span class="pl-s">'mp4'</span>,
            <span class="pl-s">'title'</span>: <span class="pl-s">'Video title goes here'</span>,
            <span class="pl-s">'thumbnail'</span>: <span class="pl-s">r're:^https?://.*\.jpg$'</span>,
            <span class="pl-c"># TODO more properties, either as:</span>
            <span class="pl-c"># * A value</span>
            <span class="pl-c"># * MD5 checksum; start the string with md5:</span>
            <span class="pl-c"># * A regular expression; start the string with re:</span>
            <span class="pl-c"># * Any Python type (for example int or float)</span>
        }
    }

    <span class="pl-k">def</span> <span class="pl-en">_real_extract</span>(<span class="pl-s1">self</span>, <span class="pl-s1">url</span>):
        <span class="pl-s1">video_id</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_match_id</span>(<span class="pl-s1">url</span>)
        <span class="pl-s1">webpage</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_download_webpage</span>(<span class="pl-s1">url</span>, <span class="pl-s1">video_id</span>)

        <span class="pl-c"># TODO more code goes here, for example ...</span>
        <span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_html_search_regex</span>(<span class="pl-s">r'<h1>(.+?)</h1>'</span>, <span class="pl-s1">webpage</span>, <span class="pl-s">'title'</span>)

        <span class="pl-k">return</span> {
            <span class="pl-s">'id'</span>: <span class="pl-s1">video_id</span>,
            <span class="pl-s">'title'</span>: <span class="pl-s1">title</span>,
            <span class="pl-s">'description'</span>: <span class="pl-s1">self</span>.<span class="pl-en">_og_search_description</span>(<span class="pl-s1">webpage</span>),
            <span class="pl-s">'uploader'</span>: <span class="pl-s1">self</span>.<span class="pl-en">_search_regex</span>(<span class="pl-s">r'<div[^>]+id="uploader"[^>]*>([^<]+)<'</span>, <span class="pl-s1">webpage</span>, <span class="pl-s">'uploader'</span>, <span class="pl-s1">fatal</span><span class="pl-c1">=</span><span class="pl-c1">False</span>),
            <span class="pl-c"># TODO more properties (see youtube_dl/extractor/common.py)</span>
        }</pre>
  </div> </li> 
 <li> <p>Add an import in <a href="https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/extractors.py"><code>youtube_dl/extractor/extractors.py</code></a>.</p> </li> 
 <li> <p>Run <code>python test/test_download.py TestDownload.test_YourExtractor</code>. This <em>should fail</em> at first, but you can continually re-run it until you're done. If you decide to add more than one test, then rename <code>_TEST</code> to <code>_TESTS</code> and make it into a list of dictionaries. The tests will then be named <code>TestDownload.test_YourExtractor</code>, <code>TestDownload.test_YourExtractor_1</code>, <code>TestDownload.test_YourExtractor_2</code>, etc. Note that tests with <code>only_matching</code> key in test's dict are not counted in.</p> </li> 
 <li> <p>Have a look at <a href="https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/common.py"><code>youtube_dl/extractor/common.py</code></a> for possible helper methods and a <a href="https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L94-L303">detailed description of what your extractor should and may return</a>. Add tests and code for as many as you want.</p> </li> 
 <li> <p>Make sure your code follows <a href="#youtube-dl-coding-conventions">youtube-dl coding conventions</a> and check the code with <a href="https://flake8.pycqa.org/en/latest/index.html#quickstart" rel="nofollow">flake8</a>:</p> <pre><code> $ flake8 youtube_dl/extractor/yourextractor.py
</code></pre> </li> 
 <li> <p>Make sure your code works under all <a href="https://www.python.org/" rel="nofollow">Python</a> versions claimed supported by youtube-dl, namely 2.6, 2.7, and 3.2+.</p> </li> 
 <li> <p>When the tests pass, <a href="https://git-scm.com/docs/git-add" rel="nofollow">add</a> the new files and <a href="https://git-scm.com/docs/git-commit" rel="nofollow">commit</a> them and <a href="https://git-scm.com/docs/git-push" rel="nofollow">push</a> the result, like this:</p> <pre><code>$ git add youtube_dl/extractor/extractors.py
$ git add youtube_dl/extractor/yourextractor.py
$ git commit -m '[yourextractor] Add new extractor'
$ git push origin yourextractor
</code></pre> </li> 
 <li> <p>Finally, <a href="https://help.github.com/articles/creating-a-pull-request">create a pull request</a>. We'll then review and merge it.</p> </li> 
</ol> 
<p>In any case, thank you very much for your contributions!</p> 
<h2><a id="user-content-youtube-dl-coding-conventions" class="anchor" aria-hidden="true" href="#youtube-dl-coding-conventions">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>youtube-dl coding conventions</h2> 
<p>This section introduces a guide lines for writing idiomatic, robust and future-proof extractor code.</p> 
<p>Extractors are very fragile by nature since they depend on the layout of the source data provided by 3rd party media hosters out of your control and this layout tends to change. As an extractor implementer your task is not only to write code that will extract media links and metadata correctly but also to minimize dependency on the source's layout and even to make the code foresee potential future changes and be ready for that. This is important because it will allow the extractor not to break on minor layout changes thus keeping old youtube-dl versions working. Even though this breakage issue is easily fixed by emitting a new version of youtube-dl with a fix incorporated, all the previous versions become broken in all repositories and distros' packages that may not be so prompt in fetching the update from us. Needless to say, some non rolling release distros may never receive an update at all.</p> 
<h3><a id="user-content-mandatory-and-optional-metafields" class="anchor" aria-hidden="true" href="#mandatory-and-optional-metafields">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Mandatory and optional metafields</h3> 
<p>For extraction to work youtube-dl relies on metadata your extractor extracts and provides to youtube-dl expressed by an <a href="https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L94-L303">information dictionary</a> or simply <em>info dict</em>. Only the following meta fields in the <em>info dict</em> are considered mandatory for a successful extraction process by youtube-dl:</p> 
<ul> 
 <li><code>id</code> (media identifier)</li> 
 <li><code>title</code> (media title)</li> 
 <li><code>url</code> (media download URL) or <code>formats</code></li> 
</ul> 
<p>In fact only the last option is technically mandatory (i.e. if you can't figure out the download location of the media the extraction does not make any sense). But by convention youtube-dl also treats <code>id</code> and <code>title</code> as mandatory. Thus the aforementioned metafields are the critical data that the extraction does not make any sense without and if any of them fail to be extracted then the extractor is considered completely broken.</p> 
<p><a href="https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L188-L303">Any field</a> apart from the aforementioned ones are considered <strong>optional</strong>. That means that extraction should be <strong>tolerant</strong> to situations when sources for these fields can potentially be unavailable (even if they are always available at the moment) and <strong>future-proof</strong> in order not to break the extraction of general purpose mandatory fields.</p> 
<h4><a id="user-content-example" class="anchor" aria-hidden="true" href="#example">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Example</h4> 
<p>Say you have some source dictionary <code>meta</code> that you've fetched as JSON with HTTP request and it has a key <code>summary</code>:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">meta</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_download_json</span>(<span class="pl-s1">url</span>, <span class="pl-s1">video_id</span>)</pre>
</div> 
<p>Assume at this point <code>meta</code>'s layout is:</p> 
<div class="highlight highlight-source-python">
 <pre>{
    ...
    "<span class="pl-s1">summary</span>": <span class="pl-s">"some fancy summary text"</span>,
    ...
}</pre>
</div> 
<p>Assume you want to extract <code>summary</code> and put it into the resulting info dict as <code>description</code>. Since <code>description</code> is an optional meta field you should be ready that this key may be missing from the <code>meta</code> dict, so that you should extract it like:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">description</span> <span class="pl-c1">=</span> <span class="pl-s1">meta</span>.<span class="pl-en">get</span>(<span class="pl-s">'summary'</span>)  <span class="pl-c"># correct</span></pre>
</div> 
<p>and not like:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">description</span> <span class="pl-c1">=</span> <span class="pl-s1">meta</span>[<span class="pl-s">'summary'</span>]  <span class="pl-c"># incorrect</span></pre>
</div> 
<p>The latter will break extraction process with <code>KeyError</code> if <code>summary</code> disappears from <code>meta</code> at some later time but with the former approach extraction will just go ahead with <code>description</code> set to <code>None</code> which is perfectly fine (remember <code>None</code> is equivalent to the absence of data).</p> 
<p>Similarly, you should pass <code>fatal=False</code> when extracting optional data from a webpage with <code>_search_regex</code>, <code>_html_search_regex</code> or similar methods, for instance:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">description</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_search_regex</span>(
    <span class="pl-s">r'<span[^>]+id="title"[^>]*>([^<]+)<'</span>,
    <span class="pl-s1">webpage</span>, <span class="pl-s">'description'</span>, <span class="pl-s1">fatal</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)</pre>
</div> 
<p>With <code>fatal</code> set to <code>False</code> if <code>_search_regex</code> fails to extract <code>description</code> it will emit a warning and continue extraction.</p> 
<p>You can also pass <code>default=<some fallback value></code>, for example:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">description</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_search_regex</span>(
    <span class="pl-s">r'<span[^>]+id="title"[^>]*>([^<]+)<'</span>,
    <span class="pl-s1">webpage</span>, <span class="pl-s">'description'</span>, <span class="pl-s1">default</span><span class="pl-c1">=</span><span class="pl-c1">None</span>)</pre>
</div> 
<p>On failure this code will silently continue the extraction with <code>description</code> set to <code>None</code>. That is useful for metafields that may or may not be present.</p> 
<h3><a id="user-content-provide-fallbacks" class="anchor" aria-hidden="true" href="#provide-fallbacks">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Provide fallbacks</h3> 
<p>When extracting metadata try to do so from multiple sources. For example if <code>title</code> is present in several places, try extracting from at least some of them. This makes it more future-proof in case some of the sources become unavailable.</p> 
<h4><a id="user-content-example-1" class="anchor" aria-hidden="true" href="#example-1">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Example</h4> 
<p>Say <code>meta</code> from the previous example has a <code>title</code> and you are about to extract it. Since <code>title</code> is a mandatory meta field you should end up with something like:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">meta</span>[<span class="pl-s">'title'</span>]</pre>
</div> 
<p>If <code>title</code> disappears from <code>meta</code> in future due to some changes on the hoster's side the extraction would fail since <code>title</code> is mandatory. That's expected.</p> 
<p>Assume that you have some another source you can extract <code>title</code> from, for example <code>og:title</code> HTML meta of a <code>webpage</code>. In this case you can provide a fallback scenario:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">meta</span>.<span class="pl-en">get</span>(<span class="pl-s">'title'</span>) <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-en">_og_search_title</span>(<span class="pl-s1">webpage</span>)</pre>
</div> 
<p>This code will try to extract from <code>meta</code> first and if it fails it will try extracting <code>og:title</code> from a <code>webpage</code>.</p> 
<h3><a id="user-content-regular-expressions" class="anchor" aria-hidden="true" href="#regular-expressions">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Regular expressions</h3> 
<h4><a id="user-content-dont-capture-groups-you-dont-use" class="anchor" aria-hidden="true" href="#dont-capture-groups-you-dont-use">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Don't capture groups you don't use</h4> 
<p>Capturing group must be an indication that it's used somewhere in the code. Any group that is not used must be non capturing.</p> 
<h5><a id="user-content-example-2" class="anchor" aria-hidden="true" href="#example-2">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Example</h5> 
<p>Don't capture id attribute name here since you can't use it for anything anyway.</p> 
<p>Correct:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s">r'(?:id|ID)=(?P<id>\d+)'</span></pre>
</div> 
<p>Incorrect:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s">r'(id|ID)=(?P<id>\d+)'</span></pre>
</div> 
<h4><a id="user-content-make-regular-expressions-relaxed-and-flexible" class="anchor" aria-hidden="true" href="#make-regular-expressions-relaxed-and-flexible">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Make regular expressions relaxed and flexible</h4> 
<p>When using regular expressions try to write them fuzzy, relaxed and flexible, skipping insignificant parts that are more likely to change, allowing both single and double quotes for quoted values and so on.</p> 
<h5><a id="user-content-example-3" class="anchor" aria-hidden="true" href="#example-3">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Example</h5> 
<p>Say you need to extract <code>title</code> from the following HTML code:</p> 
<div class="highlight highlight-text-html-basic">
 <pre><span class="pl-kos"><</span><span class="pl-ent">span</span> <span class="pl-c1">style</span>="<span class="pl-s">position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;</span>" <span class="pl-c1">class</span>="<span class="pl-s">title</span>"<span class="pl-kos">></span>some fancy title<span class="pl-kos"></</span><span class="pl-ent">span</span><span class="pl-kos">></span></pre>
</div> 
<p>The code for that task should look similar to:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_search_regex</span>(
    <span class="pl-s">r'<span[^>]+class="title"[^>]*>([^<]+)'</span>, <span class="pl-s1">webpage</span>, <span class="pl-s">'title'</span>)</pre>
</div> 
<p>Or even better:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_search_regex</span>(
    <span class="pl-s">r'<span[^>]+class=(["\'])title\1[^>]*>(?P<title>[^<]+)'</span>,
    <span class="pl-s1">webpage</span>, <span class="pl-s">'title'</span>, <span class="pl-s1">group</span><span class="pl-c1">=</span><span class="pl-s">'title'</span>)</pre>
</div> 
<p>Note how you tolerate potential changes in the <code>style</code> attribute's value or switch from using double quotes to single for <code>class</code> attribute:</p> 
<p>The code definitely should not look like:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_search_regex</span>(
    <span class="pl-s">r'<span style="position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;" class="title">(.*?)</span>'</span>,
    <span class="pl-s1">webpage</span>, <span class="pl-s">'title'</span>, <span class="pl-s1">group</span><span class="pl-c1">=</span><span class="pl-s">'title'</span>)</pre>
</div> 
<h3><a id="user-content-long-lines-policy" class="anchor" aria-hidden="true" href="#long-lines-policy">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Long lines policy</h3> 
<p>There is a soft limit to keep lines of code under 80 characters long. This means it should be respected if possible and if it does not make readability and code maintenance worse.</p> 
<p>For example, you should <strong>never</strong> split long string literals like URLs or some other often copied entities over multiple lines to fit this limit:</p> 
<p>Correct:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s">'https://www.youtube.com/watch?v=FqZTN594JQw&list=PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4'</span></pre>
</div> 
<p>Incorrect:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s">'https://www.youtube.com/watch?v=FqZTN594JQw&list='</span>
<span class="pl-s">'PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4'</span></pre>
</div> 
<h3><a id="user-content-inline-values" class="anchor" aria-hidden="true" href="#inline-values">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Inline values</h3> 
<p>Extracting variables is acceptable for reducing code duplication and improving readability of complex expressions. However, you should avoid extracting variables used only once and moving them to opposite parts of the extractor file, which makes reading the linear flow difficult.</p> 
<h4><a id="user-content-example-4" class="anchor" aria-hidden="true" href="#example-4">
  <svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
   <path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path>
  </svg></a>Example</h4> 
<p>Correct:</p> 
<div class="highlight highlight-source-python">
 <pre><span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_html_search_regex</span>(<span class="pl-s">r'<title>([^<]+)', webpage, 'title')

Incorrect:

TITLE_RE = r'([^<]+)'
# ...some lines of code...
title = self._html_search_regex(TITLE_RE, webpage, 'title')

Collapse fallbacks

Multiple fallback values can quickly become unwieldy. Collapse multiple fallback values into a single expression via a list of patterns.

Example

Good:

description = self._html_search_meta(
    ['og:description', 'description', 'twitter:description'],
    webpage, 'description', default=None)

Unwieldy:

description = (
    self._og_search_description(webpage, default=None)
    or self._html_search_meta('description', webpage, default=None)
    or self._html_search_meta('twitter:description', webpage, default=None))

Methods supporting list of patterns are: _search_regex, _html_search_regex, _og_search_property, _html_search_meta.

Trailing parentheses

Always move trailing parentheses after the last argument.

Example

Correct:

    lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'],
    list)

Incorrect:

    lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'],
    list,
)

Use convenience conversion and parsing functions

Wrap all extracted numeric data into safe functions from youtube_dl/utils.py: int_or_none, float_or_none. Use them for string to number conversions as well.

Use url_or_none for safe URL processing.

Use try_get for safe metadata extraction from parsed JSON.

Use unified_strdate for uniform upload_date or any YYYYMMDD meta field extraction, unified_timestamp for uniform timestamp extraction, parse_filesize for filesize extraction, parse_count for count meta fields extraction, parse_resolution, parse_duration for duration extraction, parse_age_limit for age_limit extraction.

Explore youtube_dl/utils.py for more useful convenience functions.

More examples

Safely extract optional description from parsed JSON
description = try_get(response, lambda x: x['result']['video'][0]['summary'], compat_str)
Safely extract more optional metadata
video = try_get(response, lambda x: x['result']['video'][0], dict) or {}
description = video.get('summary')
duration = float_or_none(video.get('durationMs'), scale=1000)
view_count = int_or_none(video.get('views'))

EMBEDDING YOUTUBE-DL

youtube-dl makes the best effort to be a good command-line program, and thus should be callable from any programming language. If you encounter any problems parsing its output, feel free to create a report.

From a Python program, you can embed youtube-dl in a more powerful fashion, like this:

from __future__ import unicode_literals
import youtube_dl

ydl_opts = {}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])

Most likely, you'll want to use various options. For a list of options available, have a look at youtube_dl/YoutubeDL.py. For a start, if you want to intercept youtube-dl's output, set a logger object.

Here's a more complete example of a program that outputs only errors (and a short message after the download is finished), and downloads/converts the video to an mp3 file:

from __future__ import unicode_literals
import youtube_dl


class MyLogger(object):
    def debug(self, msg):
        pass

    def warning(self, msg):
        pass

    def error(self, msg):
        print(msg)


def my_hook(d):
    if d['status'] == 'finished':
        print('Done downloading, now converting ...')


ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
    'logger': MyLogger(),
    'progress_hooks': [my_hook],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])

BUGS

Bugs and suggestions should be reported at: https://github.com/ytdl-org/youtube-dl/issues. Unless you were prompted to or there is another pertinent reason (e.g. GitHub fails to accept the bug report), please do not send bug reports via personal email. For discussions, join us in the IRC channel #youtube-dl on freenode (webchat).

Please include the full output of youtube-dl when run with -v, i.e. add -v flag to your command line, copy the whole output and post it in the issue body wrapped in ``` for better formatting. It should look similar to this:

$ youtube-dl -v 
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2015.12.06
[debug] Git HEAD: 135392e
[debug] Python version 2.6.6 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...

Do not post screenshots of verbose logs; only plain text is acceptable.

The output (including the first lines) contains important debugging information. Issues without the full output are often not reproducible and therefore do not get solved in short order, if ever.

Please re-read your issue once again to avoid a couple of common mistakes (you can and should use this as a checklist):

Is the description of the issue itself sufficient?

We often get issue reports that we cannot really decipher. While in most cases we eventually get the required information after asking back multiple times, this poses an unnecessary drain on our resources. Many contributors, including myself, are also not native speakers, so we may misread some parts.

So please elaborate on what feature you are requesting, or what bug you want to be fixed. Make sure that it's obvious

  • What the problem is
  • How it could be fixed
  • How your proposed solution would look like

If your report is shorter than two lines, it is almost certainly missing some of these, which makes it hard for us to respond to it. We're often too polite to close the issue outright, but the missing info makes misinterpretation likely. As a committer myself, I often get frustrated by these issues, since the only possible way for me to move forward on them is to ask for clarification over and over.

For bug reports, this means that your report should contain the complete output of youtube-dl when called with the -v flag. The error message you get for (most) bugs even says so, but you would not believe how many of our bug reports do not contain this information.

If your server has multiple IPs or you suspect censorship, adding --call-home may be a good idea to get more diagnostics. If the error is ERROR: Unable to extract ... and you cannot reproduce it from multiple countries, add --dump-pages (warning: this will yield a rather large output, redirect it to the file log.txt by adding >log.txt 2>&1 to your command-line) or upload the .dump files you get when you add --write-pages somewhere.

Site support requests must contain an example URL. An example URL is a URL you might want to download, like https://www.youtube.com/watch?v=BaW_jenozKc. There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. https://www.youtube.com/) is not an example URL.

Are you using the latest version?

Before reporting any issue, type youtube-dl -U. This should report that you're up-to-date. About 20% of the reports we receive are already fixed, but people are using outdated versions. This goes for feature requests as well.

Is the issue already documented?

Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or browse the GitHub Issues of this repository. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity.

Why are existing options not enough?

Before requesting a new feature, please have a quick peek at the list of supported options. Many feature requests are for features that actually exist already! Please, absolutely do show off your work in the issue report and detail how the existing similar options do not solve your problem.

Is there enough context in your bug report?

People want to solve problems, and often think they do us a favor by breaking down their larger problems (e.g. wanting to skip already downloaded files) to a specific request (e.g. requesting us to look whether the file exists before downloading the info page). However, what often happens is that they break down the problem into two steps: One simple, and one impossible (or extremely complicated one).

We are then presented with a very complicated request when the original problem could be solved far easier, e.g. by recording the downloaded video IDs in a separate file. To avoid this, you must include the greater context where it is non-obvious. In particular, every feature request that does not consist of adding support for a new site should contain a use case scenario that explains in what situation the missing feature would be useful.

Does the issue involve one problem, and one problem only?

Some of our users seem to think there is a limit of issues they can or should open. There is no limit of issues they can or should open. While it may seem appealing to be able to dump all your issues into one ticket, that means that someone who solves one of your issues cannot mark the issue as closed. Typically, reporting a bunch of issues leads to the ticket lingering since nobody wants to attack that behemoth, until someone mercifully splits the issue into multiple ones.

In particular, every site support request issue should only pertain to services at one site (generally under a common domain, but always using the same backend technology). Do not request support for vimeo user videos, White house podcasts, and Google Plus pages in the same issue. Also, make sure that you don't post bug reports alongside feature requests. As a rule of thumb, a feature request does not include outputs of youtube-dl that are not immediately related to the feature at hand. Do not post reports of a network error alongside the request for a new video service.

Is anyone going to need the feature?

Only post features that you (or an incapacitated friend you can personally talk to) require. Do not post features because they seem like a good idea. If they are really useful, they will be requested by someone who requires them.

Is your question about youtube-dl?

It may sound strange, but some bug reports we receive are completely unrelated to youtube-dl and relate to a different, or even the reporter's own, application. Please make sure that you are actually using youtube-dl. If you are using a UI for youtube-dl, report the bug to the maintainer of the actual application providing the UI. On the other hand, if your UI for youtube-dl fails in some way you believe is related to youtube-dl, by all means, go ahead and report the bug.

COPYRIGHT

youtube-dl is released into the public domain by the copyright holders.

This README file was originally written by Daniel Bolton and is likewise released into the public domain.

Comments
  • [YouTube] Randomly slow youtube download speed

    [YouTube] Randomly slow youtube download speed

    Checklist

    • [*] I'm reporting a broken site support
    • [*] I've verified that I'm running youtube-dl version 2021.06.06
    • [*] I've checked that all provided URLs are alive and playable in a browser
    • [*] I've checked that all URLs and arguments with special characters are properly quoted or escaped
    • [*] I've searched the bugtracker for similar issues including closed ones

    Verbose log

    root@server:~# youtube-dl https://youtu.be/8PecfdkEM2Y --source-address 64.31.22.34 --verbose
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: [u'https://youtu.be/8PecfdkEM2Y', u'--source-address', u'64.31.22.34', u'--verbose']
    WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
    [debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
    [debug] youtube-dl version 2021.06.06
    [debug] Python version 2.7.13 (CPython) - Linux-4.9.0-15-amd64-x86_64-with-debian-9.13
    [debug] exe versions: ffmpeg 4.1.2, ffprobe 4.1.2, phantomjs 2.1.1
    [debug] Proxy map: {}
    [youtube] 8PecfdkEM2Y: Downloading webpage
    [debug] Default format spec: bestvideo+bestaudio/best
    [debug] Invoking downloader on u'https://r2---sn-ab5l6n67.googlevideo.com/videoplayback?expire=1623953531&ei=GzzLYMyiKojn8wSQ-42YBA&ip=64.31.22.34&id=o-AMDSXCc14P0ndQaRCkihVxb1SwdClDAhUbq8xP8nD2ss&itag=313&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&mh=e_&mm=31%2C26&mn=sn-ab5l6n67%2Csn-vgqsrnee&ms=au%2Conr&mv=m&mvi=2&pl=24&initcwndbps=14958750&vprv=1&mime=video%2Fwebm&ns=gA0RPx_S5d5eK1Qi3zH6xdcF&gir=yes&clen=202533160&dur=299.160&lmt=1617981974189982&mt=1623931501&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5532432&n=0B2xjorVelV0Xu6Hq&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAI7W7dT0pYaOQgxn1mHYX3js6NByrqiykD9fsPJs3kAXAiApHiHXVdDMO1k6OKyg2sAb1PMyMO1jfgtZV5R-7frcpw%3D%3D&sig=AOq0QJ8wRgIhAPdD-seXFXT-yOEqoIqCQfPnRqMLASvU8SbymG5TPpNhAiEA1pVFpS3hDYqTVe1ia5sDOi9RaPf3BCuT94XB-vICq_E='
    [download] Destination: Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f313.webm
    [download]  18.4% of 193.15MiB at 77.46KiB/s ETA 34:44Terminated
    

    While the download was in progress, I ran the exact same command in another terminal, another folder, and the download was completed in a few seconds:

    root@server:~/test# youtube-dl https://youtu.be/8PecfdkEM2Y --source-address 64.31.22.34 --verbose
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: [u'https://youtu.be/8PecfdkEM2Y', u'--source-address', u'64.31.22.34', u'--verbose']
    WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
    [debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
    [debug] youtube-dl version 2021.06.06
    [debug] Python version 2.7.13 (CPython) - Linux-4.9.0-15-amd64-x86_64-with-debian-9.13
    [debug] exe versions: ffmpeg 4.1.2, ffprobe 4.1.2, phantomjs 2.1.1
    [debug] Proxy map: {}
    [youtube] 8PecfdkEM2Y: Downloading webpage
    [debug] Default format spec: bestvideo+bestaudio/best
    [debug] Invoking downloader on u'https://r2---sn-ab5l6n67.googlevideo.com/videoplayback?expire=1623953574&ei=RjzLYLyWBIHGhwak2IzwBg&ip=64.31.22.34&id=o-AFgzn9Zdn1KSGbuO09ZkpRma9GzWqWUApkavXXN93_F6&itag=313&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&mh=e_&mm=31%2C29&mn=sn-ab5l6n67%2Csn-ab5szne7&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=14958750&vprv=1&mime=video%2Fwebm&ns=hoSqVT_3ust7ILej5iYoT40F&gir=yes&clen=202533160&dur=299.160&lmt=1617981974189982&mt=1623931501&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5532432&n=l6PFqwM4uREk1JKwP&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAJU5426qtqf6BwLiB48OKkcK_ATe_S9jDPYAVbttM7T1AiBoVGwb1ZBagaiUyKeVGLv562cloZeh5xBT2lFZx61gyQ%3D%3D&sig=AOq0QJ8wRAIgWSAyj1JyqoTHFWMdJ04gjcIDJ8tFryw5sNsf5soVaPQCIE81_29FoDoAOeRv2_hdcnBi2-4XxvlGvbX9YNajLi6y'
    [download] Destination: Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f313.webm
    [download] 100% of 193.15MiB in 00:04
    [debug] Invoking downloader on u'https://r2---sn-ab5l6n67.googlevideo.com/videoplayback?expire=1623953574&ei=RjzLYLyWBIHGhwak2IzwBg&ip=64.31.22.34&id=o-AFgzn9Zdn1KSGbuO09ZkpRma9GzWqWUApkavXXN93_F6&itag=251&source=youtube&requiressl=yes&mh=e_&mm=31%2C29&mn=sn-ab5l6n67%2Csn-ab5szne7&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=14958750&vprv=1&mime=audio%2Fwebm&ns=hoSqVT_3ust7ILej5iYoT40F&gir=yes&clen=5324207&dur=299.201&lmt=1617980855722369&mt=1623931501&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5531432&n=l6PFqwM4uREk1JKwP&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIqCBWf7PmHH8y1wnG8QvB-0vxKzRG26qCAIWdgOAT1PAiEAwTSl4J0e9L7emiYUDKV_YjfApo2gchge3iVfrYH76lo%3D&sig=AOq0QJ8wRQIgODhcEL0uT0u1nXP41IARrB63CfmpDmUzl6HhPwrXOTwCIQD-OUE152N7yzYXcgU_tAPCP0YdRdfVyFlHE4kIYyyoew=='
    [download] Destination: Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f251.webm
    [download] 100% of 5.08MiB in 00:00
    [ffmpeg] Merging formats into "Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.webm"
    [debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f313.webm' -i 'file:Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f251.webm' -c copy -map '0:v:0' -map '1:a:0' 'file:Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.temp.webm'
    Deleting original file Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f313.webm (pass -k to keep)
    Deleting original file Hatik_-_daron_des_demain_session_acoustique-8PecfdkEM2Y.f251.webm (pass -k to keep)
    

    Description

    Hello,

    Important: The problem is random, maybe 1 chance on 8 to produce it. You have to download several videos in a row (about 10) to notice it.

    Since a few weeks, randomly a youtube video can be slowed down to 48 Kio/s, so it takes 5-10 minutes to download a short video of 5 minutes instead of 4, 5 seconds, often the download does not succeed and stops after a few minutes.

    This happens on several servers, several internet providers as well as with my private connection.

    I even managed to launch a second download in parallel when the first one was taking time, the second one finished in 1 seconds, the first one in 5 minutes and was interrupted before the end. Same video, same connection, same command. (tested only with ipv4 because I don't have ipv6 on my servers or with my internet connection).

    Attached is an extraction of the results with --dump-pages. ko.txt ok.txt

    opened by triplesixman 342
  • openload.co extractor not working

    openload.co extractor not working

    youtube-dl --get-url --verbose https://openload.co/embed/kUEfGclsU9o/ [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'--get-url', u'--verbose', u'https://openload.co/embed/kUEfGclsU9o/'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.08.22 [debug] Python version 2.6.6 - Linux-2.6.32-642.1.1.el6.x86_64-x86_64-with-centos-6.8-Final [debug] exe versions: ffmpeg 0.6.5, ffprobe 0.6.5 [debug] Proxy map: {} ERROR: Unable to extract link image; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 691, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 347, in extract return self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/openload.py", line 62, in _real_extract r'<img[^>]+id="linkimg"[^>]+src="([^"]+)"', webpage, 'link image') File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 650, in _search_regex raise RegexNotFoundError('Unable to extract %s' % _name) RegexNotFoundError: Unable to extract link image; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

    broken-IE 
    opened by byteholding 326
  • Crunchyroll Login page throwing 503

    Crunchyroll Login page throwing 503

    Please follow the guide below

    • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
    • Put an x into all the boxes [ ] relevant to your issue (like that [x])
    • Use Preview tab to see how your issue will actually look like

    Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.12.22. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

    • [x ] I've verified and I assure that I'm running youtube-dl 2016.12.22

    Before submitting an issue make sure you have:

    • [x] At least skimmed through README and most notably FAQ and BUGS sections
    • [x] Searched the bugtracker for similar issues including closed ones

    What is the purpose of your issue?

    • [x] Bug report (encountered problems with youtube-dl)
    • [ ] Site support request (request for adding support for a new site)
    • [ ] Feature request (request for a new functionality)
    • [ ] Question
    • [ ] Other

    The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


    If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

    Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

    Youtube-DL>youtube-dl -i "http://www.crunchyroll.com/fairy-musketeers/episode-1-akazukin-finally-comes-510412" -u MyUserName -p MyPassword --verbose
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['-i', 'http://www.crunchyroll.com/fairy-musketeers/episode-1-akazukin-finally-comes-510412', '-u', 'PRIVATE', '-p', 'PRIVATE', '--verbose']
    [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
    [debug] youtube-dl version 2016.12.31
    [debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
    [debug] exe versions: ffmpeg N-62728-g6956b04, rtmpdump 2.5
    [debug] Proxy map: {}
    [Crunchyroll] Downloading login page
    ERROR: Unable to download webpage: HTTP Error 503: Service Temporarily Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest versi
    on; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpa0c7afb5\build\youtube_dl\extractor\common.py", line 406, in _request_webpage
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpa0c7afb5\build\youtube_dl\YoutubeDL.py", line 2001, in urlopen
      File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
      File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
      File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
      File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
      File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
    
    ...
    
    

    Description of your issue, suggested solution and other information

    If you provide login credentials for Crunchyroll, then the script shows a HTTP Error 503: Service Temporarily Unavailable (caused by HTTPError()) error. But, if you remove the login credentials, it'll download the video/playlist just fine. Above, I have provided a log with the login credentials. I can open the login page just fine on all the browsers and I'm not behind any firewall. I have tried this with 2 different systems, in different location and I had the same result.

    I checked the login page and it was just cloudflare browser check. There was no captcha to solve or anything, as mentioned in this issue.

    opened by Xonshiz 110
  • youtube-dl is back

    youtube-dl is back

    As everybody already knows our dev repository has been reinstated earlier today. You can read the full story here.

    We would like to thank @github for standing up for youtube-dl and making it possible to continue development without dropping any features. We appreciate @github for taking potential legal risks in this regard.

    We would also like to thank @EFForg and personally @Mitch77 for invaluable legal help.

    We would also like to heartily thank our main website hoster Uberspace who is currently being sued in Germany for hosting our essentially business card website and who have already spent thousands of Euros in their legal defense.

    We also appreciate massive amount of support received lately and we are sorry we could not physically respond to everybody.

    Finally, we would like to thank all youtube-dl users and contributors for using and improving youtube-dl.

    Thank you all.

    youtube-dl is back!

    opened by dstftw 109
  • openload.co hotlinking detection

    openload.co hotlinking detection

    Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.03. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

    • [x] I've verified and I assure that I'm running youtube-dl 2016.06.03

    Before submitting an issue make sure you have:

    • [x] At least skimmed through README and most notably FAQ and BUGS sections
    • [x] Searched the bugtracker for similar issues including closed ones

    What is the purpose of your issue?

    • [x] Bug report (encountered problems with youtube-dl)
    • [ ] Site support request (request for adding support for a new site)
    • [ ] Feature request (request for a new functionality)
    • [ ] Question
    • [ ] Other

    If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

    Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

    $ youtube-dl -v https://openload.co/f/kUEfGclsU9o
    [debug] System config: []
    [debug] User config: []
    [debug] Command-line args: ['-v', 'https://openload.co/f/kUEfGclsU9o']
    [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
    [debug] youtube-dl version 2016.06.03
    [debug] Python version 3.5.1 - Linux-4.5.4-gnu-1-x86_64-with-arch
    [debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4
    [debug] Proxy map: {}
    [Openload] kUEfGclsU9o: Downloading webpage
    [debug] Invoking downloader on 'https://openload.co/stream/famBaQI9BRQ~1465252297~2602:306::~t47S-POR?mime=true'
    [download] Destination: skyrim_no-audio_1080.mp4-kUEfGclsU9o.mp4
    [download] 100% of 31.86MiB in 05:26
    

    Description of your issue, suggested solution and other information

    openload.co no longer seeks to allow hotlinking and will redirect you to videos of pigeons instead of the video inputted to youtube-dl. This occurs on the latest version. Happens on both links like https://openload.co/f/kUEfGclsU9o and https://openload.co/embed/kUEfGclsU9o. I'm not familiar with the way the download link is returned, but it seems a solution would involve changing the method of requesting or returning the link.

    broken-IE 
    opened by ghost 107
  • [discovery]

    [discovery] "GO" Channels have been discontinued

    Please follow the guide below

    • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
    • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
    • Use the Preview tab to see what your issue will actually look like

    Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.12.10. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

    • [X] I've verified and I assure that I'm running youtube-dl 2017.12.10

    Before submitting an issue make sure you have:

    • [X] At least skimmed through the README, most notably the FAQ and BUGS sections
    • [X] Searched the bugtracker for similar issues including closed ones

    What is the purpose of your issue?

    • [X] Bug report (encountered problems with youtube-dl)
    • [X] Site support request (request for adding support for a new site)
    • [ ] Feature request (request for a new functionality)
    • [ ] Question
    • [ ] Other

    The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


    If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

    Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

    E:\>youtube-dl https://www.discovery.com/tv-shows/gold-rush/full-episodes/gold-bars-and-hail-marys --verbose
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['https://www.discovery.com/tv-shows/gold-rush/full-episodes/gold-bars-and-hail-marys', '--verbose']
    [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
    [debug] youtube-dl version 2017.12.10
    [debug] Python version 3.4.4 - Windows-10-10.0.14393
    [debug] exe versions: ffmpeg N-89395-g71421f382f, ffprobe N-72383-g7206b94, rtmpdump 2.4
    [debug] Proxy map: {}
    [Discovery] gold-bars-and-hail-marys: Downloading JSON metadata
    ERROR: gold-bars-and-hail-marys: Failed to parse JSON  (caused by ValueError('Expecting value: line 1 column 1 (char 0)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\extractor\common.py", line 686, in _parse_json
      File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
      File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
      File "C:\Python\Python34\lib\json\decoder.py", line 361, in raw_decode
    ValueError: Expecting value: line 1 column 1 (char 0)
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\extractor\common.py", line 686, in _parse_json
      File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
      File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
      File "C:\Python\Python34\lib\json\decoder.py", line 361, in raw_decode
    ValueError: Expecting value: line 1 column 1 (char 0)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\extractor\common.py", line 437, in extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\extractor\discovery.py", line 67, in _real_extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\extractor\common.py", line 680, in _download_json
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp9arpqqmf\build\youtube_dl\extractor\common.py", line 690, in _parse_json
    youtube_dl.utils.ExtractorError: gold-bars-and-hail-marys: Failed to parse JSON  (caused by ValueError('Expecting value: line 1 column 1 (char 0)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    ...
    <end of log>
    

    If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

    • Single video: https://www.discovery.com/tv-shows/gold-rush/full-episodes/gold-bars-and-hail-marys
    • Single video: https://www.tlc.com/tv-shows/90-day-fiance-before-the-90-days/full-episodes/tell-all
    • Single video: https://www.animalplanet.com/tv-shows/tanked/full-episodes/this-tank-is-ludacris

    Description of your issue, suggested solution and other information

    All of the Discovery "GO" channels (discoverygo.com, tlcgo.com, animalplanetgo.com, etc) are being discontinued. They have moved all of the Full Episodes to the non-GO channels (discovery.com, tlc.com, animalplanet.com, etc).

    The current [discovery] extractor does not work on these sites.

    They also have lowered the quality of the videos on the GO channels to 720p. It appears that the 1080p videos are available on the non-GO channels.

    Thanks.!

    fixed 
    opened by StevenDTX 104
  • [Extractor Error] Getting extractor error when downloading videos from VIU.

    [Extractor Error] Getting extractor error when downloading videos from VIU.

    Checklist

    • [x] I'm reporting a broken site support issue
    • [x] I've verified that I'm running youtube-dl version 2020.09.20
    • [x] I've checked that all provided URLs are alive and playable in a browser
    • [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
    • [x] I've searched the bugtracker for similar bug reports including closed ones
    • [x] I've read bugs section in FAQ

    Verbose log

    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['https://www.viu.com/ott/sg/en-us/vod/13733/Coffee-Prince', '--verbose']
    [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
    [debug] youtube-dl version 2020.09.20
    [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
    [debug] exe versions: ffmpeg 4.3.1-essentials_build-www.gyan.dev, ffprobe git-2019-12-08-9f7b2b3
    [debug] Proxy map: {}
    [viu:ott] 13733: Downloading video info
    [viu:ott] 13733: Downloading stream info
    ERROR: An extractor error has occurred. (caused by KeyError('data',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 532, in extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\viu.py", line 233, in _real_extract
    KeyError: 'data'
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 532, in extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\viu.py", line 233, in _real_extract
    KeyError: 'data'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 545, in extract
    youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('data',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    
    

    Description

    This doesn't require any credentials so it is easy to duplicate. I am running Windows 10 and youtube-dl.exe and have begun seeing this error for about 1 week now. I am unsure as to myself doing anything wrong as I am doing the same as I did earlier when it used to work. Any help regarding this issue will be really great.

    duplicate 
    opened by AlecHex 94
  • youtube_dl.utils.ExtractorError: Could not find JS function 'na'

    youtube_dl.utils.ExtractorError: Could not find JS function 'na'

    Checklist

    • [ ] I'm reporting a broken site support issue
    • [x] I've verified that I'm running youtube-dl version 2021.06.06
    • [x] I've checked that all provided URLs are alive and playable in a browser
    • [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
    • [x] I've searched the bugtracker for similar bug reports including closed ones
    • [x] I've read bugs section in FAQ

    Verbose log

    $ youtube-dl --verbose https://youtu.be/nXPyDlvZ1oQ
    [debug] System config: []
    [debug] User config: ['--format', 'bestvideo+bestaudio[ext=m4a]/bestvideo+bestaudio/best', '--merge-output-format', 'mp4', '-o', '/data/data/com.termux/files/home/storage/dcim/Camera/%(extractor_key)s-%(uploader)s-%(title)s-%(id)s.%(ext)s', '--no-mtime']
    [debug] Custom config: []
    [debug] Command-line args: ['--verbose', 'https://youtu.be/nXPyDlvZ1oQ']
    [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
    [debug] youtube-dl version 2021.06.06
    [debug] Python version 3.9.1 (CPython) - Linux-4.14.190-22338387-abN975USQS7FUI6-aarch64-with-libc
    [debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1
    [debug] Proxy map: {}
    [youtube] nXPyDlvZ1oQ: Downloading webpage
    [youtube] nXPyDlvZ1oQ: Downloading player 204bfffb
    ERROR: Signature extraction failed: Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
        func = self._extract_signature_function(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
        res = self._parse_sig_js(code)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
        initial_function = jsi.extract_function(funcname)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 245, in extract_function
        raise ExtractorError('Could not find JS function %r' % funcname)
    youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
     (caused by ExtractorError("Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
        func = self._extract_signature_function(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
        res = self._parse_sig_js(code)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
        initial_function = jsi.extract_function(funcname)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 245, in extract_function
        raise ExtractorError('Could not find JS function %r' % funcname)
    youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
        func = self._extract_signature_function(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
        res = self._parse_sig_js(code)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
        initial_function = jsi.extract_function(funcname)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 245, in extract_function
        raise ExtractorError('Could not find JS function %r' % funcname)
    youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
        return func(self, *args, **kwargs)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
        ie_result = ie.extract(url)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 534, in extract
        ie_result = self._real_extract(url)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1623, in _real_extract
        signature = self._decrypt_signature(sc['s'][0], video_id, player_url)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1358, in _decrypt_signature
        raise ExtractorError(
    youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
        func = self._extract_signature_function(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
        res = self._parse_sig_js(code)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
        initial_function = jsi.extract_function(funcname)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 245, in extract_function
        raise ExtractorError('Could not find JS function %r' % funcname)
    youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
     (caused by ExtractorError("Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    

    Description

    Trying to download video with either url or just video code returns the indicated error

    opened by MantisTree 89
  • Added ThisVid.com support

    Added ThisVid.com support

    Please follow the guide below

    • You will be asked some questions, please read them carefully and answer honestly
    • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
    • Use Preview tab to see how your pull request will actually look like

    Before submitting a pull request make sure you have:

    In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

    • [x] I am the original author of this code and I am willing to release it under Unlicense
    • [ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

    What is the purpose of your pull request?

    • [ ] Bug fix
    • [ ] Improvement
    • [x] New extractor
    • [ ] New feature

    Description of your pull request and other information

    Added ThisVid.com extractor, the website ThisVid.com.

    He was the author of the basic code. The code he written was forgotten in an old issue, this issue. This new extractor almost remade is requested also in this issue, that is still open. The code is working fine, with python 2.6, 2.7, and 3.2+; the extractor is also been teste with flake8

    Resolves #17713. Resolves #30867.

    Closes #26060.

    opened by FraFraFra-LongD 69
  • Getting error message for YouTube Videos (Signature extraction failed)

    Getting error message for YouTube Videos (Signature extraction failed)

    Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.09.01. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

    • [x] I've verified and I assure that I'm running youtube-dl 2018.09.01

    Before submitting an issue make sure you have:

    • [x] At least skimmed through the README, most notably the FAQ and BUGS sections
    • [x] Searched the bugtracker for similar issues including closed ones
    • [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

    What is the purpose of your issue?

    • [x] Bug report (encountered problems with youtube-dl)
    • [ ] Site support request (request for adding support for a new site)
    • [ ] Feature request (request for a new functionality)
    • [ ] Question
    • [ ] Other

    If I try ' youtube-dl --skip-download --verbose --print-json 25lnfHkENm4 ' I often get:

    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['--skip-download', '--verbose', '--print-json', '25lnfHkENm4']
    [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
    [debug] youtube-dl version 2018.09.01
    [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
    [debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
    [debug] Proxy map: {}
    ERROR: Signature extraction failed: Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
     (caused by RegexNotFoundError('Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\YoutubeDL.py", line 792, in extract_info
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 502, in extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1803, in _real_extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1220, in _decrypt_signature
    youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
     (caused by RegexNotFoundError('Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    

    This also happens for all other Youtube videos I've tested. I get this error just since today. The last 2 days I had no problems with printing the json video information. But sometimes it works.

    Update:

    Seems like this is not a problem with the '--print-json' argument. This also happens in other cases. (I just noticed it first with the 'print-json'). For ' youtube-dl --verbose 25lnfHkENm4 ' i get:

    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['--verbose', '25lnfHkENm4']
    [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
    [debug] youtube-dl version 2018.09.01
    [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
    [debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
    [debug] Proxy map: {}
    [youtube] 25lnfHkENm4: Downloading webpage
    [youtube] 25lnfHkENm4: Downloading video info webpage
    [youtube] {22} signature length 41.42, html5 player vflvABTsY
    [youtube] 25lnfHkENm4: Downloading player https://www.youtube.com/yts/jsbin/player-vflvABTsY/en_US/base.js
    ERROR: Signature extraction failed: Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
     (caused by RegexNotFoundError('Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\YoutubeDL.py", line 792, in extract_info
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 502, in extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1803, in _real_extract
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1220, in _decrypt_signature
    youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1210, in _decrypt_signature
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1121, in _extract_signature_function
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\youtube.py", line 1182, in _parse_sig_js
      File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkzpz548c\build\youtube_dl\extractor\common.py", line 972, in _search_regex
    youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
     (caused by RegexNotFoundError('Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    
    opened by Skydef 69
  • Atresplayer broken: ERROR: Unsupported URL

    Atresplayer broken: ERROR: Unsupported URL

    • [X] I've verified and I assure that I'm running youtube-dl 2018.04.25

    • [X] At least skimmed through the README, most notably the FAQ and BUGS sections

    • [X] Searched the bugtracker for similar issues including closed ones

    • [X] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

    • [X] Bug report (encountered problems with youtube-dl)

    [nekmo@homura /tmp]$ youtube-dl -v 'https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/'
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['-v', 'https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/']
    [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
    [debug] youtube-dl version 2018.04.25
    [debug] Python version 3.6.3 (CPython) - Linux-4.14.5-1-ARCH-x86_64-with-arch
    [debug] exe versions: ffmpeg 3.4, ffprobe 3.4, rtmpdump 2.4
    [debug] Proxy map: {}
    [generic] cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b: Requesting header
    WARNING: Falling back on generic information extractor.
    [generic] cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b: Downloading webpage
    [generic] cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b: Extracting information
    ERROR: Unsupported URL: https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 789, in extract_info
        ie_result = ie.extract(url)
      File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 440, in extract
        ie_result = self._real_extract(url)
      File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/generic.py", line 3182, in _real_extract
        raise UnsupportedError(url)
    youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/
    

    Atresplayer is supported on Youtube-Dl. Example Url:

    • Single video: https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/
    account-needed 
    opened by Nekmo 66
  • Site xvideos.com not downloading amateur-channels

    Site xvideos.com not downloading amateur-channels

    Checklist

    • [x ] I'm reporting a broken site support issue
    • [x ] I've verified that I'm running youtube-dl version 2021.12.17
    • [x ] I've checked that all provided URLs are alive and playable in a browser
    • [x ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
    • [x ] I've searched the bugtracker for similar bug reports including closed ones
    • [x ] I've read bugs section in FAQ

    Verbose log

    C:\!Scripts>youtube-dl --verbose flag https://www.xvideos.com/amateur-channels/closeupfantasy#_tabVideos
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['--verbose', 'flag', 'https://www.xvideos.com/amateur-channels/closeupfantasy#_tabVideos']
    [debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
    [debug] youtube-dl version 2021.12.17
    [debug] Python version 3.10.6 (CPython) - Windows-10-10.0.19044-SP0
    [debug] exe versions: ffmpeg n4.3.1-26-gca55240b8c, ffprobe n4.3.1-26-gca55240b8c, phantomjs 2.1.1
    [debug] Proxy map: {}
    ERROR: 'flag' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:flag" ) to search YouTube
    Traceback (most recent call last):
      File "C:\Users\Test\AppData\Local\Programs\Python\Python310\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
        return func(self, *args, **kwargs)
      File "C:\Users\Test\AppData\Local\Programs\Python\Python310\lib\site-packages\youtube_dl\YoutubeDL.py", line 836, in __extract_info
        ie_result = ie.extract(url)
      File "C:\Users\Test\AppData\Local\Programs\Python\Python310\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
        ie_result = self._real_extract(url)
      File "C:\Users\Test\AppData\Local\Programs\Python\Python310\lib\site-packages\youtube_dl\extractor\generic.py", line 2361, in _real_extract
        raise ExtractorError(
    youtube_dl.utils.ExtractorError: 'flag' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:flag" ) to search YouTube
    
    

    Description

    Site xvideos.com not downloading amateur-channels on Windows 10 using youtube_dl-2021.12.17 via Python (tried also using youtube-dl.exe), showing as unsupported URL

    opened by draconis10 0
  • ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests

    ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests

    for i in range(len(urls)): try: infos_array = np.array(video_info(urls[i])) except: print(('skip'))

    output: ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests (caused by <HTTPError 429: 'Too Many Requests'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. skip

    opened by SaraSardarBechtle 1
  • ffmpeg.py looks for  'ffmpeg_location

    ffmpeg.py looks for 'ffmpeg_location

    Checklist

    • [x] I'm reporting a broken site support issue
    • [x] I've verified that I'm running youtube-dl version 2021.12.17
    • [x] I've checked that all provided URLs are alive and playable in a browser
    • [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
    • [x] I've searched the bugtracker for similar bug reports including closed ones
    • [x] I've read bugs section in FAQ

    Verbose log

    [debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
    [debug] youtube-dl version 2021.12.17
    [debug] Python version 3.9.7 (CPython) - Windows-10-10.0.19045-SP0
    [debug] exe versions: none
    [debug] Proxy map: {}
    [generic] master: Requesting header
    [generic] master: Downloading m3u8 information
    [debug] Default format spec: best/bestvideo+bestaudio
    

    Description

    While running from command line, the location of ffmppeg can be passed using option --ffmpeg-location However, while trying to use this in Python, using this option produces the below error, even though its passed as below 'ffmpeg-location' : '.\Downloads\ffmpeg\bin\ffmpeg.exe', I was trying to go through various modules where this value is being picked up, and found it in ffmpeg.py

    location = self._downloader.params.get('ffmpeg_location')

    now once i change the option to use this,

    'ffmpeg-_ocation' : '.\Downloads\ffmpeg\bin\ffmpeg.exe', everything works fine. Can we either fix the code or update the documentation to use underscore, instead of hypen?

    Traceback (most recent call last): File ".\PycharmProjects\pythonProject\Hello.py", line 42, in meta = ydl.extract_info( File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 808, in extract_info return self.__extract_info(url, ie, download, extra_info, process) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 847, in __extract_info return self.process_ie_result(ie_result, download, extra_info) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 881, in process_ie_result return self.process_video_result(ie_result, download=download) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1692, in process_video_result self.process_info(new_info) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1976, in process_info success = dl(filename, info_dict) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1915, in dl return fd.download(name, info) File ".\anaconda3\lib\site-packages\youtube_dl\downloader\common.py", line 366, in download return self.real_download(filename, info_dict) File ".\anaconda3\lib\site-packages\youtube_dl\downloader\external.py", line 35, in real_download retval = self._call_downloader(tmpfilename, info_dict) File ".\anaconda3\lib\site-packages\youtube_dl\downloader\external.py", line 227, in _call_downloader self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.') File ".\anaconda3\lib\site-packages\youtube_dl\downloader\common.py", line 165, in report_error self.ydl.report_error(*args, **kargs) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 628, in report_error self.trouble(error_message, tb) File ".\anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 598, in trouble raise DownloadError(message, exc_info) youtube_dl.utils.DownloadError: ERROR: m3u8 download detected but ffmpeg or avconv could not be found. Please install one.

    opened by codevalid 4
  • tiktok

    tiktok

    Checklist

    • [x] I'm asking a question
    • [x] I've looked through the README and FAQ for similar questions
    • [x] I've searched the bugtracker for similar questions including closed ones

    Question

    hi,

    i looking new tiktok endpoint for video without watermark, before used this endpoint: https://api-t2.tiktokv.com/aweme/v1/aweme/detail/?aweme_id=

    this was work for some time but recently stop work, anyone have new endpoint?

    question 
    opened by marii89 0
  • AnyClass

    AnyClass

    Checklist

    • [x] I'm reporting a new site support request
    • [x] I've verified that I'm running youtube-dl version 2021.12.17
    • [x] I've checked that all provided URLs are alive and playable in a browser
    • [x] I've checked that none of provided URLs violate any copyrights
    • [x] I've searched the bugtracker for similar site support requests including closed ones

    Example URLs

    • Single video: https://anyclass.com/class/course/1011477/calendar/1
    • Playlist: https://anyclass.com/class/course/1011477/calendar

    Description

    Please add an extractor for AnyClass

    site-support-request 
    opened by slavakurilyak 1
  • Subtitles not found on Red Bull TV

    Subtitles not found on Red Bull TV

    • [x] I'm reporting a broken site support
    • [x] I've verified that I'm running youtube-dl version 2021.12.17
    • [x] I've checked that all provided URLs are alive and playable in a browser
    • [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
    • [x] I've searched the bugtracker for similar issues including closed ones

    Verbose log

    $ youtube-dl -v https://www.redbull.com/int-en/episodes/reel-rock-s8-e6 --list-sub
    [debug] System config: []
    [debug] User config: []
    [debug] Custom config: []
    [debug] Command-line args: ['-v', 'https://www.redbull.com/int-en/episodes/reel-rock-s8-e6', '--list-sub']
    [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
    [debug] youtube-dl version 2021.12.17
    [debug] Python version 3.9.12 (CPython) - Linux-5.15.0-56-generic-x86_64-with-glibc2.35
    [debug] exe versions: ffmpeg 4.4.2, ffprobe 4.4.2
    [debug] Proxy map: {}
    [RedBull] reel-rock-s8-e6: Downloading JSON metadata
    [RedBullEmbed] rrn:content:episode-videos:c038ad0f-7ce7-4825-b47e-5c5de25ff2c6:en-INT: Downloading JSON metadata
    [RedBullEmbed] AANUZR8HLR8731PQKS82: Downloading access token
    [RedBullEmbed] AANUZR8HLR8731PQKS82: Downloading video information
    [RedBullEmbed] AANUZR8HLR8731PQKS82: Downloading m3u8 information
    AANUZR8HLR8731PQKS82 has no subtitles
    

    Description

    It doesn't seems to be correctly finding subtitles on Red Bull TV. For example, the following video has many subtitles but they were not found by youtube-dl:

    https://www.redbull.com/int-en/episodes/reel-rock-s8-e6

    opened by fhcwcsy 1
Releases(2021.12.17)
nextdl - download videos from youtube.com or other video platforms

nextdl - download videos from youtube.com or other video platforms

null 3 Feb 2, 2022
YouTube-Video-Downloader - Download Youtube Videos for free.

YouTube-Video-Downloader Download Youtube Videos for free. Installing Dependencies:- Windows pip install pytube Mac/Linux pip3 install pytube Clonin

Xception Inc. 1 Jan 1, 2022
Jocomol 16 Dec 12, 2022
FireDM is a python open source (Internet Download Manager) with multi-connections, high speed engine, it downloads general files and videos from youtube and tons of other streaming websites .

python open source (Internet Download Manager) with multi-connections, high speed engine, based on python, LibCurl, and youtube_dl https://github.com/firedm/FireDM

null 1.6k Apr 12, 2022
A simple Python program which uses youtube-dl for downloading YouTube videos as mp3 files.

yt-mp3 converter This is a simple Python program which uses youtube-dl for downloading YouTube videos as mp3 files. This program is for you if you are

nostalgicnerdpenguin 1 Oct 24, 2021
A python program to download one or multiple videos from YouTube.

YouTube-Video-Downloader A python program to download one or multiple videos from YouTube. Quick Start guide First Clone The Project git clone https:/

Imira Randeniya 1 Sep 11, 2022
Using Youtube downloader is the fast and easy way to download and save any YouTube video.

Youtube video downloader using Django Using Django as a backend along with pytube module to create Youtbue Video Downloader. https://yt-videos-downloa

Suman Raj Khanal 10 Jun 18, 2022
A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

pytube 7.9k Jan 2, 2023
Youtube Downloader is a Graphic User Interface(GUI) that lets users download a Youtube Video or Audio through a URL

Youtube Downloader This Python and Tkinter based GUI allows users to directly download the Best Resolution Videos and Audios from Youtube. Pa-fy Insta

Samarth Kumar 2 Jun 25, 2022
📼Command line tool based on youtube-dl to easily download selected channels from your subscriptions.

youtube-cdl Command line tool based on youtube-dl to easily download selected channels from your subscriptions. This tool is very handy if you want to

Anatoly 64 Dec 25, 2022
YouTube Downloader is extremely simple program for downloading songs or playlists (in audio or video) from YouTube. Created using Python, PyTube and PySimpleGUI.

YouTube Downloader YouTube Downloader is extremely simple program for downloading songs or playlists (in audio or video) from YouTube. Disclaimer It's

Simeon Tsvetanov 3 Dec 14, 2022
PyQt5 simple files , youtube videos and youtube playlist downloader

PyQt5 simple files , youtube videos and youtube playlist downloader

AmirHossein Mohammadi 7 Jul 25, 2022
A Udemy downloader that can download DRM protected videos and non-DRM protected videos.

Udemy Downloader with DRM support NOTE This program is WIP, the code is provided as-is and i am not held resposible for any legal repercussions result

Puyodead1 468 Dec 29, 2022
A CLI that searches and download Youtube videos in mp3 format.

A CLI that searches and download Youtube videos in mp3 format.

Finhawk 4 Jul 25, 2022
Download YouTube videos/music and images in MP4, JPG with this tool.

ABOUT THE TOOL Download YouTube videos, music and images in MP4, JPG with this tool, with an easy to understand interface. This tool works with both,

TrollSkull 5 Jan 2, 2023
Download clips from youtube videos with a few clicks and a GUI!

YouClip v2.0.0 Table Of Contents: What Is YouClip Installation Usage Stuff To Fix Changelog What Is YouClip? ! IMPORTANT: The source files are a total

ador 2 Oct 5, 2021
Youtube Downloader by PyTube é uma ferramenta simples com interface gráfica e escrito em python para baixar vídeos e playlists do youtube...

YouTube Downloader by PyTube O que é o YouTube Downloader by PyTube? YouTube Downloader by PyTube é um software simples para baixar vídeos no YouTube

Elizeu Barbosa Abreu 5 Jul 30, 2022
Download Youtube videos in mp4 format in a fast, easy, convenient way made with Python!

yt_downloader Download Youtube videos in mp4 format in a fast, easy, convenient way made with Python! Required Modules pytube os time colorama Errors

null 3 Jul 2, 2022
🔥 A Bot To Telegram For Download High Qulity Videos & Songs From Youtube

?? A Bot To Telegram For Download High Qulity Videos & Songs From Youtube ?? Fast And Free Bot No Need To Pay ✅ By SL-Alpha-X-Team ⚡

Official Alpha-X-Team Account 7 Aug 31, 2022