Add --mobile-version program option

This commit is contained in:
Ricardo Garcia 2008-07-22 22:18:51 +02:00 committed by Ricardo Garcia
parent 2130d8f6a4
commit 90663284b2
1 changed files with 3 additions and 1 deletions

View File

@ -437,7 +437,7 @@ class YoutubeIE(InfoExtractor):
format_param = params.get('format', None) format_param = params.get('format', None)
# Extension # Extension
video_extension = {'18': 'mp4'}.get(format_param, 'flv') video_extension = {'18': 'mp4', '17': '3gp'}.get(format_param, 'flv')
# Normalize URL, including format # Normalize URL, including format
normalized_url = 'http://www.youtube.com/watch?v=%s' % video_id normalized_url = 'http://www.youtube.com/watch?v=%s' % video_id
@ -537,6 +537,8 @@ if __name__ == '__main__':
dest='format', metavar='FMT', help='video format code') dest='format', metavar='FMT', help='video format code')
parser.add_option('-b', '--best-quality', parser.add_option('-b', '--best-quality',
action='store_const', dest='video_format', help='alias for -f 18', const='18') action='store_const', dest='video_format', help='alias for -f 18', const='18')
parser.add_option('-m', '--mobile-version',
action='store_const', dest='video_format', help='alias for -f 17', const='17')
parser.add_option('-i', '--ignore-errors', parser.add_option('-i', '--ignore-errors',
action='store_true', dest='ignoreerrors', help='continue on download errors', default=False) action='store_true', dest='ignoreerrors', help='continue on download errors', default=False)
(opts, args) = parser.parse_args() (opts, args) = parser.parse_args()