mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[utils] traverse_obj: Fix more bugs
				
					
				
			and cleanup uses of `default=[]`
Continued from b1bde57bef
			
			
This commit is contained in:
		| @@ -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 {} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Sawicki
					Simon Sawicki