]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/options.py
Add option `--ignore-no-formats-error`
[yt-dlp.git] / yt_dlp / options.py
index cced9fb898aabc2fe1ec9f8d9893c2409a0dfe13..fef1e4b1521dfbefba965e80a4b14edf0342270c 100644 (file)
@@ -749,6 +749,16 @@ def _dict_from_multiple_values_options_callback(
         '-s', '--simulate',
         action='store_true', dest='simulate', default=False,
         help='Do not download the video and do not write anything to disk')
+    verbosity.add_option(
+        '--ignore-no-formats-error',
+        action='store_true', dest='ignore_no_formats_error', default=False,
+        help=(
+            'Ignore "No video formats" error. Usefull for extracting metadata '
+            'even if the video is not actually available for download (experimental)'))
+    verbosity.add_option(
+        '--no-ignore-no-formats-error',
+        action='store_false', dest='ignore_no_formats_error',
+        help='Throw error when no downloadable video formats are found (default)')
     verbosity.add_option(
         '--skip-download', '--no-download',
         action='store_true', dest='skip_download', default=False,