mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-29 03:55:53 +00:00
Update yt_dlp/extractor/patreon.py
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
parent
f7fb9e42e4
commit
791cc954bd
@ -428,9 +428,8 @@ class PatreonIE(PatreonBaseIE):
|
|||||||
cursor = None
|
cursor = None
|
||||||
for comment in traverse_obj(response, (('data', 'included'), lambda _, v: v['type'] == 'comment' and v['id'])):
|
for comment in traverse_obj(response, (('data', 'included'), lambda _, v: v['type'] == 'comment' and v['id'])):
|
||||||
count += 1
|
count += 1
|
||||||
if (comment_id := try_call(lambda: comment.get('id'))) is None:
|
comment_id = comment['id']
|
||||||
continue
|
attributes = traverse_obj(comment, ('attributes', {dict})) or {}
|
||||||
attributes = comment.get('attributes') or {}
|
|
||||||
author_id = traverse_obj(comment, ('relationships', 'commenter', 'data', 'id'))
|
author_id = traverse_obj(comment, ('relationships', 'commenter', 'data', 'id'))
|
||||||
author_info = traverse_obj(
|
author_info = traverse_obj(
|
||||||
response, ('included', lambda _, v: v['id'] == author_id and v['type'] == 'user', 'attributes'),
|
response, ('included', lambda _, v: v['id'] == author_id and v['type'] == 'user', 'attributes'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user