X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube-dl;h=08afab4f801e4d84c86e6285bada64a53c241d8e;hb=43f35682e9cf509459097e6fdebe2f10c95094f1;hp=4acdecd795477a143b1acb412a941ae2c5a93ec2;hpb=42bcd27d3bc30c12218630c68af364190f819cc2;p=youtube-dl diff --git a/youtube-dl b/youtube-dl index 4acdecd79..08afab4f8 100755 --- a/youtube-dl +++ b/youtube-dl @@ -260,7 +260,9 @@ class FileDownloader(object): return try: - filename = self.params['outtmpl'] % info_dict + template_dict = dict(info_dict) + template_dict['epoch'] = unicode(long(time.time())) + filename = self.params['outtmpl'] % template_dict self.report_destination(filename) except (ValueError, KeyError), err: self.trouble('ERROR: invalid output template or system charset: %s' % str(err)) @@ -433,7 +435,7 @@ class YoutubeIE(InfoExtractor): _LOGIN_URL = 'http://www.youtube.com/signup?next=/&gl=US&hl=en' _AGE_URL = 'http://www.youtube.com/verify_age?next_url=/&gl=US&hl=en' _NETRC_MACHINE = 'youtube' - _available_formats = ['22', '18', '17', '13'] # listed in order of priority for -b flag + _available_formats = ['22', '35', '18', '17', '13'] # listed in order of priority for -b flag _video_extensions = { '13': '3gp', '17': 'mp4', @@ -994,7 +996,7 @@ if __name__ == '__main__': # Parse command line parser = optparse.OptionParser( usage='Usage: %prog [options] url...', - version='INTERNAL', + version='2009.05.11', conflict_handler='resolve', ) @@ -1036,13 +1038,13 @@ if __name__ == '__main__': action='store_true', dest='geturl', help='simulate, quiet but print URL', default=False) verbosity.add_option('-e', '--get-title', action='store_true', dest='gettitle', help='simulate, quiet but print title', default=False) - verbosity.add_option('-t', '--title', - action='store_true', dest='usetitle', help='use title in file name', default=False) - verbosity.add_option('-l', '--literal', - action='store_true', dest='useliteral', help='use literal title in file name', default=False) parser.add_option_group(verbosity) filesystem = optparse.OptionGroup(parser, 'Filesystem Options') + filesystem.add_option('-t', '--title', + action='store_true', dest='usetitle', help='use title in file name', default=False) + filesystem.add_option('-l', '--literal', + action='store_true', dest='useliteral', help='use literal title in file name', default=False) filesystem.add_option('-o', '--output', dest='outtmpl', metavar='TPL', help='output filename template') filesystem.add_option('-a', '--batch-file',