diff options
author | Kegan <[email protected]> | 2011-04-23 14:56:06 +0800 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2011-09-15 12:14:16 +0200 |
commit | c52b01f326186004f434e654944b7264c918727c (patch) | |
tree | 3c2621584ff4d688fd9fe64e114f33a0af1769eb | |
parent | 36597dc40f311f3b209f92f6fefae7466decc758 (diff) | |
download | youtube-dl-c52b01f326186004f434e654944b7264c918727c.tar.gz youtube-dl-c52b01f326186004f434e654944b7264c918727c.zip |
Added ability to download worst quality video file only. (Closes #113)
-rwxr-xr-x | youtube-dl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube-dl b/youtube-dl index c41228c93..2fc88b0e8 100755 --- a/youtube-dl +++ b/youtube-dl @@ -1320,6 +1320,8 @@ class YoutubeIE(InfoExtractor): return if req_format is None: video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality + elif req_format == 'worst': + video_url_list = [(existing_formats[len(existing_formats)-1], url_map[existing_formats[len(existing_formats)-1]])] # worst quality elif req_format == '-1': video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats else: @@ -2832,6 +2834,8 @@ class FacebookIE(InfoExtractor): return if req_format is None: video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality + elif req_format == 'worst': + video_url_list = [(existing_formats[len(existing_formats)-1], url_map[existing_formats[len(existing_formats)-1]])] # worst quality elif req_format == '-1': video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats else: |