[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:
parent
dc3028d233
commit
0cf643b234
2 changed files with 6 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue