mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-28 21:57:57 +00:00
comments
Authored by: bashonly
This commit is contained in:
parent
c62a5e5890
commit
d5a3888291
|
@ -360,9 +360,10 @@ def _real_extract(self, url):
|
||||||
'channel_follower_count': ('attributes', 'patron_count', {int_or_none}),
|
'channel_follower_count': ('attributes', 'patron_count', {int_or_none}),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
# Not all `info` is extracted until after the previous loop is exhausted
|
||||||
for entry in entries:
|
for entry in entries:
|
||||||
entry.update(info)
|
entry.update(info)
|
||||||
|
# Add `id` field after updating entries so indexed id is not overwritten
|
||||||
info['id'] = video_id
|
info['id'] = video_id
|
||||||
|
|
||||||
# handle Vimeo embeds
|
# handle Vimeo embeds
|
||||||
|
@ -409,10 +410,11 @@ def _real_extract(self, url):
|
||||||
elif not entries:
|
elif not entries:
|
||||||
self.raise_no_formats('No supported media found in this post', video_id=video_id, expected=True)
|
self.raise_no_formats('No supported media found in this post', video_id=video_id, expected=True)
|
||||||
elif len(entries) == 1:
|
elif len(entries) == 1:
|
||||||
|
# Need to unpack info again to add comments and overwrite potentially indexed id
|
||||||
return {**entries[0], **info}
|
return {**entries[0], **info}
|
||||||
else:
|
else:
|
||||||
return self.playlist_result(entries, **info)
|
return self.playlist_result(entries, **info)
|
||||||
# return only metadata for --ignore-no-formats-error
|
# Return only metadata for --ignore-no-formats-error
|
||||||
return info
|
return info
|
||||||
|
|
||||||
def _get_comments(self, post_id):
|
def _get_comments(self, post_id):
|
||||||
|
|
Loading…
Reference in a new issue