Update yt_dlp/extractor/patreon.py

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
Jackson Humphrey 2024-11-13 12:47:17 -06:00 committed by GitHub
parent b9a7cd6c67
commit f7fb9e42e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -426,7 +426,7 @@ class PatreonIE(PatreonBaseIE):
f'posts/{post_id}/comments', post_id, query=params, note=f'Downloading comments page {page}')
cursor = None
for comment in traverse_obj(response, (('data', ('included', lambda _, v: v['type'] == 'comment')), ...)):
for comment in traverse_obj(response, (('data', 'included'), lambda _, v: v['type'] == 'comment' and v['id'])):
count += 1
if (comment_id := try_call(lambda: comment.get('id'))) is None:
continue