aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/options.py')
-rw-r--r--youtube_dl/options.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 9d9195b60..f64aa5b85 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -245,6 +245,25 @@ def parseOpts(overrideArguments=None):
metavar='COUNT', dest='max_views', default=None, type=int,
help='Do not download any videos with more than COUNT views')
selection.add_option(
+ '--match-filter',
+ metavar='FILTER', dest='match_filter', default=None,
+ help=(
+ '(Experimental) Generic video filter. '
+ 'Specify any key (see help for -o for a list of available keys) to'
+ ' match if the key is present, '
+ '!key to check if the key is not present,'
+ 'key > NUMBER (like "comment_count > 12", also works with '
+ '>=, <, <=, !=, =) to compare against a number, and '
+ '& to require multiple matches. '
+ 'Values which are not known are excluded unless you'
+ ' put a question mark (?) after the operator.'
+ 'For example, to only match videos that have been liked more than '
+ '100 times and disliked less than 50 times (or the dislike '
+ 'functionality is not available at the given service), but who '
+ 'also have a description, use --match-filter '
+ '"like_count > 100 & dislike_count <? 50 & description" .'
+ ))
+ selection.add_option(
'--no-playlist',
action='store_true', dest='noplaylist', default=False,
help='If the URL refers to a video and a playlist, download only the video.')