Sort IEs alphabetically in --list-extractors
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 1 Jul 2013 16:21:29 +0000 (18:21 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 1 Jul 2013 16:21:29 +0000 (18:21 +0200)
youtube_dl/__init__.py

index 98388a9f341d7e0cb13e62ca14a566bda8208173..c4b09695c44f4e16b4d64a05426f18ea50910a83 100644 (file)
@@ -420,7 +420,7 @@ def _real_main(argv=None):
     extractors = gen_extractors()
 
     if opts.list_extractors:
-        for ie in extractors:
+        for ie in sorted(extractors, key=lambda ie: ie.IE_NAME.lower()):
             compat_print(ie.IE_NAME + (' (CURRENTLY BROKEN)' if not ie._WORKING else ''))
             matchedUrls = [url for url in all_urls if ie.suitable(url)]
             all_urls = [url for url in all_urls if url not in matchedUrls]