1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-22 07:58:54 +00:00

[utils] Add deprecation_warning

See https://github.com/yt-dlp/yt-dlp/pull/2173#issuecomment-1097021515
This commit is contained in:
pukkandan
2022-08-30 20:58:28 +05:30
parent e1eabd7beb
commit da4db748fa
12 changed files with 67 additions and 40 deletions

View File

@@ -2959,8 +2959,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
# YouTube comments have a max depth of 2
max_depth = int_or_none(get_single_config_arg('max_comment_depth'))
if max_depth:
self._downloader.deprecation_warning(
'[youtube] max_comment_depth extractor argument is deprecated. Set max replies in the max-comments extractor argument instead.')
self._downloader.deprecated_feature('[youtube] max_comment_depth extractor argument is deprecated. '
'Set max replies in the max-comments extractor argument instead')
if max_depth == 1 and parent:
return