aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/options.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-06-22 04:54:39 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-06-22 13:03:07 +0530
commitb4e0d75848e9447cee2cd3646ce54d4744a7ff56 (patch)
tree2146220a62f40ace502ed17b1653b9632d29dcbe /yt_dlp/options.py
parent71dc18fa29263a1ff0472c23d81bfc8dd4422d48 (diff)
Improve `--download-sections`
* Support negative time-ranges * Add `*from-url` to obey time-ranges in URL Closes #7248
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r--yt_dlp/options.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index 9d6dbec9f..163809706 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -1012,8 +1012,9 @@ def create_parser():
'--download-sections',
metavar='REGEX', dest='download_ranges', action='append',
help=(
- 'Download only chapters whose title matches the given regular expression. '
- 'Time ranges prefixed by a "*" can also be used in place of chapters to download the specified range. '
+ 'Download only chapters that match the regular expression. '
+ 'A "*" prefix denotes time-range instead of chapter. Negative timestamps are calculated from the end. '
+ '"*from-url" can be used to download between the "start_time" and "end_time" extracted from the URL. '
'Needs ffmpeg. This option can be used multiple times to download multiple sections, '
'e.g. --download-sections "*10:15-inf" --download-sections "intro"'))
downloader.add_option(