[utils] traverse_obj: Fix more bugs
and cleanup uses of `default=[]`
Continued from b1bde57bef
This commit is contained in:
parent
c0cd13fb1c
commit
6839ae1f6d
10 changed files with 84 additions and 67 deletions
|
|
@ -310,7 +310,7 @@ class PatreonIE(PatreonBaseIE):
|
|||
f'posts/{post_id}/comments', post_id, query=params, note='Downloading comments page %d' % page)
|
||||
|
||||
cursor = None
|
||||
for comment in traverse_obj(response, (('data', ('included', lambda _, v: v['type'] == 'comment')), ...), default=[]):
|
||||
for comment in traverse_obj(response, (('data', ('included', lambda _, v: v['type'] == 'comment')), ...)):
|
||||
count += 1
|
||||
comment_id = comment.get('id')
|
||||
attributes = comment.get('attributes') or {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue