On Unix it look for ~/.config/youtube-dl/config.ini or ~/.config/youtube-dl.ini, Windows support is currently missing.
The new config file is in the INI format, the options are given in the long form without the leading dashes.
Parameters for an specific extractor are written in their own section.
When a video is contained in a playlist, it inherits the parameters from the playlist extractor.
Example:
write-thumbnail=
[youtube:playlist]
output=%(playlist)s/%(id)s.%(ext)s
[youtube]
format=webm
All the videos use '--write-thumbnail', videos inside a YouTube playlist use the specified output template and YouTube videos are downloaded in the webm format.
encode_dict functionality has been improved and moved directly into compat_urllib_parse_urlencode
All occurrences of compat_urllib_parse.urlencode throughout the codebase have been replaced by compat_urllib_parse_urlencode
Closes#8974
This is much more robust than just using regexps, and handles all
the common scenarios, such as empty/no values, repeated attributes,
entity decoding, mixed case names, and the different possible value
quoting schemes.
This is actually not a compatibility routine but rather a workaround for URLs without protocol specified.
The protocol-less URL is treated as HTTP one since it's most probable scenario and it will most likely to
redirect to HTTPS if HTTPS was actually expected. This routine could also be useful for any Request
preprocessing that may be added in future.
Now the semantic of this function is identical to
shutil.get_terminal_size() in Python 3.3+. The new behavior also
corresponds to the old get_term_width(), which is removed in
003c69a84b68cadb46aeb8e03115848a722fd675
* required unquote_to_bytes function ported as well
(uses .decode('hex') instead of dynamically populated _hextobyte global)
* required implicit conversion to bytes and/or unicode in places due to
differing type assumptions in p3
The spec string is processed using 'tokenize.tokenize' to split it in words and operators, the filters are still processed using regular expressions.
This should make easier to allow grouping operators with parens.