for ie in list_extractors(opts.age_limit):
if not ie.working():
continue
- desc = getattr(ie, 'IE_DESC', ie.IE_NAME)
- if desc is False:
+ if ie.IE_DESC is False:
continue
+ desc = ie.IE_DESC or ie.IE_NAME
if getattr(ie, 'SEARCH_KEY', None) is not None:
_SEARCHES = ('cute kittens', 'slithering pythons', 'falling cat', 'angry poodle', 'purple fish', 'running tortoise', 'sleeping bunny', 'burping cow')
_COUNTS = ('', '5', '10', 'all')
validate_positive('requests sleep interval', opts.sleep_interval_requests)
validate_positive('sleep interval', opts.sleep_interval)
validate_positive('max sleep interval', opts.max_sleep_interval)
- if opts.max_sleep_interval is not None:
+ if opts.sleep_interval is None:
validate(
- opts.sleep_interval is not None, 'min sleep interval',
+ opts.max_sleep_interval is None, 'min sleep interval',
msg='{name} must be specified; use --min-sleep-interval')
+ elif opts.max_sleep_interval is None:
+ opts.max_sleep_interval = opts.sleep_interval
+ else:
validate_minmax(opts.sleep_interval, opts.max_sleep_interval, 'sleep interval')
if opts.wait_for_video is not None:
raise ValueError('unsupported geo-bypass country or ip-block')
opts.match_filter = match_filter_func(opts.match_filter)
- opts.date = DateRange.day(opts.date) if opts.date else DateRange(opts.dateafter, opts.datebefore)
if opts.download_archive is not None:
opts.download_archive = expand_path(opts.download_archive)
setattr(opts, opt1, default)
# Conflicting options
- report_conflict('--date-after', 'dateafter', '--date', 'date', default=None)
- report_conflict('--date-before', 'datebefore', '--date', 'date', default=None)
+ report_conflict('--dateafter', 'dateafter', '--date', 'date', default=None)
+ report_conflict('--datebefore', 'datebefore', '--date', 'date', default=None)
report_conflict('--exec-before-download', 'exec_before_dl_cmd', '"--exec before_dl:"', 'exec_cmd', opts.exec_cmd.get('before_dl'))
report_conflict('--id', 'useid', '--output', 'outtmpl', val2=opts.outtmpl.get('default'))
report_conflict('--remux-video', 'remuxvideo', '--recode-video', 'recodevideo')
# report_deprecation(opts.writeannotations, '--write-annotations') # It's just that no website has it
# Dependent options
+ opts.date = DateRange.day(opts.date) if opts.date else DateRange(opts.dateafter, opts.datebefore)
+
if opts.exec_before_dl_cmd:
opts.exec_cmd['before_dl'] = opts.exec_before_dl_cmd
if opts.dump_user_agent:
ua = traverse_obj(opts.headers, 'User-Agent', casesense=False, default=std_headers['User-Agent'])
write_string(f'{ua}\n', out=sys.stdout)
+ sys.exit(0)
if print_extractor_information(opts, all_urls):
sys.exit(0)