]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/options.py
Add option `--use-extractors`
[yt-dlp.git] / yt_dlp / options.py
index 0cddb7fd5268f59912cf6416bc83bc2711305149..bee531d1b518cd19e117862e0a0d39b704a3269c 100644 (file)
@@ -353,10 +353,20 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
         '--extractor-descriptions',
         action='store_true', dest='list_extractor_descriptions', default=False,
         help='Output descriptions of all supported extractors and exit')
+    general.add_option(
+        '--use-extractors', '--ies',
+        action='callback', dest='allowed_extractors', metavar='NAMES', type='str',
+        default=[], callback=_list_from_options_callback,
+        help=(
+            'Extractor names to use separated by commas. '
+            'You can also use regexes, "all", "default" and "end" (end URL matching); '
+            'e.g. --ies "holodex.*,end,youtube". '
+            'Prefix the name with a "-" to exclude it, e.g. --ies default,-generic. '
+            'Use --list-extractors for a list of available extractor names'))
     general.add_option(
         '--force-generic-extractor',
         action='store_true', dest='force_generic_extractor', default=False,
-        help='Force extraction to use the generic extractor')
+        help=optparse.SUPPRESS_HELP)
     general.add_option(
         '--default-search',
         dest='default_search', metavar='PREFIX',