Update Vimeo Info Extractor to get pull in the description properly
[youtube-dl] / youtube_dl / __init__.py
index b6ee2e119640196d15a26afee56f8ed92f59c6c2..efa8b813f8ea0b96b65b971c83e2a8b376e78607 100644 (file)
@@ -20,6 +20,7 @@ __authors__  = (
     'shizeeg',
     'Filippo Valsorda',
     'Christian Albrecht',
+    'Dave Vasilevsky',
     )
 
 __license__ = 'Public Domain'
@@ -374,7 +375,6 @@ def gen_extractors():
         YoutubeIE(),
         MetacafeIE(),
         DailymotionIE(),
-        GoogleIE(),
         GoogleSearchIE(),
         PhotobucketIE(),
         YahooIE(),
@@ -399,6 +399,7 @@ def gen_extractors():
         GooglePlusIE(),
         ArteTvIE(),
         NBAIE(),
+        JustinTVIE(),
         GenericIE()
     ]
 
@@ -504,6 +505,18 @@ def _real_main():
         if not opts.audioquality.isdigit():
             parser.error(u'invalid audio quality specified')
 
+    if sys.version_info < (3,):
+        # In Python 2, sys.argv is a bytestring (also note http://bugs.python.org/issue2128 for Windows systems)
+        if opts.outtmpl is not None:
+            opts.outtmpl = opts.outtmpl.decode(preferredencoding())
+    outtmpl =((opts.outtmpl is not None and opts.outtmpl)
+            or (opts.format == '-1' and opts.usetitle and u'%(title)s-%(id)s-%(format)s.%(ext)s')
+            or (opts.format == '-1' and u'%(id)s-%(format)s.%(ext)s')
+            or (opts.usetitle and opts.autonumber and u'%(autonumber)s-%(title)s-%(id)s.%(ext)s')
+            or (opts.usetitle and u'%(title)s-%(id)s.%(ext)s')
+            or (opts.useid and u'%(id)s.%(ext)s')
+            or (opts.autonumber and u'%(autonumber)s-%(id)s.%(ext)s')
+            or u'%(id)s.%(ext)s')
     # File downloader
     fd = FileDownloader({
         'usenetrc': opts.usenetrc,
@@ -521,14 +534,7 @@ def _real_main():
         'format': opts.format,
         'format_limit': opts.format_limit,
         'listformats': opts.listformats,
-        'outtmpl': ((opts.outtmpl is not None and opts.outtmpl.decode(preferredencoding()))
-            or (opts.format == '-1' and opts.usetitle and u'%(title)s-%(id)s-%(format)s.%(ext)s')
-            or (opts.format == '-1' and u'%(id)s-%(format)s.%(ext)s')
-            or (opts.usetitle and opts.autonumber and u'%(autonumber)s-%(title)s-%(id)s.%(ext)s')
-            or (opts.usetitle and u'%(title)s-%(id)s.%(ext)s')
-            or (opts.useid and u'%(id)s.%(ext)s')
-            or (opts.autonumber and u'%(autonumber)s-%(id)s.%(ext)s')
-            or u'%(id)s.%(ext)s'),
+        'outtmpl': outtmpl,
         'restrictfilenames': opts.restrictfilenames,
         'ignoreerrors': opts.ignoreerrors,
         'ratelimit': opts.ratelimit,