Commit Graph

66 Commits (e71be6ee9f239308765443d49d91358fa306e48a)

Author SHA1 Message Date
Sergey M․ e118a8794f
[YoutubeDL] Fix typo in string negation implementation and add more tests (closes #18961) 6 years ago
Sergey M․ 2cc779f497
[YoutubeDL] Add negation support for string comparisons in format selection expressions (closes #18600, closes #18805) 6 years ago
Sergey M․ d08dcd2dbd
[test_YoutubeDL] Fix typo (closes #14856) 7 years ago
Sergey M․ af0f74288d
[YoutubeDL] Improve _default_format_spec (closes #14461) 7 years ago
Sergey M․ cd6fc19ed7
[YoutubeDL] Ignore duplicates in --playlist-items
E.g. '--playlist-items 2-4,3-4,3' should result in '[2,3,4]', not '[2,3,4,3,4,3]'
7 years ago
Sergey M․ 86a15ed64b
[test_YoutubeDL] Add test for #14425 7 years ago
Sergey M․ 8cda78ef72
[test_YoutubeDL] Add a test for #10083 7 years ago
Sergey M․ 0017d9ad6d
[YoutubeDL] Improve default format specification (closes #13704) 7 years ago
Sergey M․ 0396806f67
[YoutubeDL] Do not override id, extractor and extractor_key in url_transparent
All these meta fields must be borrowed from final extractor that actually performs extraction.
This commit fixes extractor id in download archives for url_transparent downloads. Previously, 'transparent' extractor was erroneously
used for extractor archive id, e.g. 'eggheadlesson 4n8ugwwj5t' instead of 'wistia 4n8ugwwj5t'.
7 years ago
Sergey M․ 15da37c7dc
[YoutubeDL] Don't expand env variables in meta fields (closes #13637) 7 years ago
Sergey M․ 51350db5a3
[test_YoutubeDL] Add test for #11163 8 years ago
Sergey M․ d0d9ade486 [YoutubeDL] Add support for string formatting operations in output template 8 years ago
Sergey M․ 398dea3210
[test_YoutubeDL] Fix invalid escape sequences 8 years ago
Sergey M․ db13c16ef8
[utils] Add support for quoted string literals in --match-filter (closes #8050, closes #12142, closes #12144) 8 years ago
Sergey M․ e5a088dc4b
[utils] Fix --match-filter for int-like strings (closes #11082) 8 years ago
Sergey M․ 317f7ab634
[YoutubeDL] Fix format selection with filters (Closes #10083) 8 years ago
Sergey M․ 4c3b16d5d1 [test_YoutubeDL] Add test for format_id format selection 9 years ago
Sergey M․ e0dccdd398 [test_YoutubeDL] PEP 8 9 years ago
Sergey M․ 5d583bdf6c [YoutubeDL] Improve _format_note 9 years ago
Sergey M․ 86bf29050e [test_YoutubeDL] Make test pass until more intelligent sort formats (Closes #8462) 9 years ago
remitamine 91cb6b5065 rename _parse_mpd to _parse_mpd_formats and add default value for mpd namespace 9 years ago
Yen Chi Hsuan 1df4141196 [test_YoutubeDL] Fix test_youtube_format_selection
Broken since a6c2c24479. Thanks to
@jaimeMF and @anisse for pointing that out
9 years ago
Yen Chi Hsuan b286f201a8 [YoutubeDL] Do not override ie_key in url_transparent 9 years ago
dyn888 b913348d5f Test codec with a dot '.' in name selection. 9 years ago
Jaime Marquínez Ferrándiz e37afbe0b8 [YoutubeDL] urlopen: disable the 'file:' protocol (#8227)
If someone is running youtube-dl on a server to deliver files, the user could input 'file:///some/important/file' and youtube-dl would save that file as a video giving access to sensitive information to the user.
'file:' urls can be filtered, but the user can use an URL to a crafted m3u8 manifest like:

    #EXTM3U
    #EXT-X-MEDIA-SEQUENCE:0
    #EXTINF:10.0
    file:///etc/passwd
    #EXT-X-ENDLIST

With this patch 'file:' URLs raise URLError like for unknown protocols.
9 years ago
Jaime Marquínez Ferrándiz 232541df44 [YoutubeDL] format spec: correctly handle dashes and other unused operators
'mp4-baseline-16x9' must be handled as a single string, but the '-' was treated as an operator.
9 years ago
Jaime Marquínez Ferrándiz d96d604e53 YoutubeDL: format spec: don't accept a bare '/' (#6124) 9 years ago
Jaime Marquínez Ferrándiz 0a31a35098 [YoutubeDL] format spec: add additional checks for invalid syntax 9 years ago
Jaime Marquínez Ferrándiz bb8e553662 [YoutubeDL] format spec: Do not fail when a filter gives an empty result
For example with 'best[height<40]' we ended getting a 'IndexError: list index out of range'.
10 years ago
Jaime Marquínez Ferrándiz f5f4a27a96 [YoutubeDL] format spec: fix handling of '/' with ','
When using 'bestvideo/best,bestaudio', 'bestvideo/best' must be set as the current_selector (instead of appending it to the selectors), otherwise when it gets the ',' it would append 'None' to the selectors.
10 years ago
Jaime Marquínez Ferrándiz cf2ac6df68 [YoutubeDL] format spec: Fix handling of '+' with '/'
'bestvideo+bestaudio/best' was incorrectly interpreted as 'bestvideo+(bestaudio/best)', so it would fail if 'bestaudio' doesn't exist instead of falling back to 'best'.
10 years ago
Jaime Marquínez Ferrándiz 0130afb76e [YoutubeDL] format spec: allow grouping specifiers with parentheses 10 years ago
Jaime Marquínez Ferrándiz 5acfa126c8 [YoutubeDL] format spec: treat 'all' like a normal specifier
So you can use filters with it, for example 'all[width>=400][width<=600]'.
10 years ago
Jaime Marquínez Ferrándiz 67134eaba1 [YoutubeDL] rework how the format spec is processed
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.
10 years ago
Jaime Marquínez Ferrándiz e9eaf3fbcf [test/YoutubeDL] Add tests for 'playliststart', 'playlistend' and 'playlist_items' 10 years ago
Jaime Marquínez Ferrándiz 8dd5418803 Make 'best' format only match non-DASH formats (closes #5554)
Otherwise it's impossible to only download non-DASH formats, for example `best[height=?480]/best` would download a DASH video if it's the only one with height=480, instead for falling back to the second format specifier.
For audio only urls (soundcloud, bandcamp ...), the best audio will be downloaded as before.
10 years ago
Jaime Marquínez Ferrándiz 9f3fa89f7c Remove the --max-quality option
It doesn't work well with 'bestvideo' and 'bestaudio' because they are usually before the max quality.
Format filters should be used instead, they are more flexible and don't require the requested quality to exist for each video.
10 years ago
Jaime Marquínez Ferrándiz 592e97e855 Postprocessors: use a list for the files that can be deleted
We could only know if we had to delete the original file, but this system allows to specify us more files (like subtitles).
10 years ago
Jaime Marquínez Ferrándiz 531980d89c [test/YoutubeDL] test match_filter 10 years ago
Jaime Marquínez Ferrándiz f20bf146e2 [test/YoutubeDL] split in two classes
The name was misleading
10 years ago
Jaime Marquínez Ferrándiz 8508557e77 [test/YoutubeDL] Use valid urls
It failed on python 3.4 when building the http_headers field
10 years ago
Jaime Marquínez Ferrándiz 98c70d6fc7 [YoutubeDL] only add normal subtitles to the 'requested_subtitles' field if 'writesubtitles' is True 10 years ago
Jaime Marquínez Ferrándiz ab84349b16 [test/YoutubeDL] Add test for subtitles
Updated the offlinetest make target to not skip it
10 years ago
Jaime Marquínez Ferrándiz 0161353d7d [test/test_YoutubeDL] Remove debug print call 10 years ago
Jaime Marquínez Ferrándiz 2b4ecde2c8 [test/YoutubeDL] Add a simple test for postprocesors
Just checks that the 'keepvideo' option works as intended.
10 years ago
Philipp Hagemeister 083c9df93b [YoutubeDL] Allow filtering by properties (Fixes #4584) 10 years ago
Philipp Hagemeister 0217c78377 [YoutubeDL] Allow selection by more extensions 10 years ago
Philipp Hagemeister c11125f9ed [tests] Remove format 138 from tests (#4559) 10 years ago
Jouke Waleson 5f6a1245ff PEP8 applied 10 years ago
Philipp Hagemeister a053c3493a [test_YoutubeDL] Reorder formats (#3542) 10 years ago