mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-26 04:02:11 +00:00
Added ability to download worst quality video file only. (Closes #113)
This commit is contained in:
parent
36597dc40f
commit
c52b01f326
1 changed files with 4 additions and 0 deletions
|
@ -1320,6 +1320,8 @@ class YoutubeIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
if req_format is None:
|
if req_format is None:
|
||||||
video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality
|
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':
|
elif req_format == '-1':
|
||||||
video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
|
video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
|
||||||
else:
|
else:
|
||||||
|
@ -2832,6 +2834,8 @@ class FacebookIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
if req_format is None:
|
if req_format is None:
|
||||||
video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality
|
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':
|
elif req_format == '-1':
|
||||||
video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
|
video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue