mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-03 16:15:14 +00:00
[extractor/youtube] Differentiate between no and disabled comments (#5491)
`comments` and `comment_count` will be set to None, as opposed to an empty list and 0, respectively. Fixes https://github.com/yt-dlp/yt-dlp/issues/5068 Authored by: coletdjnz, pukkandan
This commit is contained in:
@@ -3270,6 +3270,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
message = self._get_text(root_continuation_data, ('contents', ..., 'messageRenderer', 'text'), max_runs=1)
|
||||
if message and not parent and tracker['running_total'] == 0:
|
||||
self.report_warning(f'Youtube said: {message}', video_id=video_id, only_once=True)
|
||||
raise self.CommentsDisabled
|
||||
|
||||
@staticmethod
|
||||
def _generate_comment_continuation(video_id):
|
||||
|
||||
Reference in New Issue
Block a user