Add --mobile-version program option
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Tue, 22 Jul 2008 20:18:51 +0000 (22:18 +0200)
committerRicardo Garcia <devnull@localhost>
Tue, 22 Jul 2008 20:18:51 +0000 (22:18 +0200)
youtube-dl

index 0e56162206b3e793f53010b22a480d70494ba2b7..2c1d1aa3b84b5e3cda680e22fe0a6a39dc91c777 100755 (executable)
@@ -437,7 +437,7 @@ class YoutubeIE(InfoExtractor):
                        format_param = params.get('format', None)
 
                # Extension
-               video_extension = {'18': 'mp4'}.get(format_param, 'flv')
+               video_extension = {'18': 'mp4', '17': '3gp'}.get(format_param, 'flv')
 
                # Normalize URL, including format
                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')
                parser.add_option('-b', '--best-quality',
                                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',
                                action='store_true', dest='ignoreerrors', help='continue on download errors', default=False)
                (opts, args) = parser.parse_args()