mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
[ie/ARD] Use traverse_obj
Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
This commit is contained in:
parent
a434c7b7e2
commit
ddc7e9a1bb
1 changed files with 5 additions and 3 deletions
|
@ -678,11 +678,13 @@ class ARDAudiothekIE(InfoExtractor):
|
|||
'description': ('description', {str}),
|
||||
}))
|
||||
|
||||
item = self.graphql_query(display_id, self._QUERY_ITEM % video_id)['item']
|
||||
audio_list = item.get('audioList', [])
|
||||
return {
|
||||
'display_id': display_id,
|
||||
'formats': [{'url': x['href'], 'format_id': x['distributionType']} for x in audio_list],
|
||||
'formats': traverse_obj(self.graphql_query(display_id, self._QUERY_ITEM % video_id), (
|
||||
'item', 'audioList', lambda _, v: url_or_none(v['href']), {
|
||||
'url': 'href',
|
||||
'format_id': ('distributionType', {str}),
|
||||
})),
|
||||
'id': video_id,
|
||||
**traverse_obj(item, {
|
||||
'description': ('synopsis', {str}),
|
||||
|
|
Loading…
Reference in a new issue