mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-20 19:16:06 +03:00
[ie/SVTPlay] simplify traverse_obj call
As found by: dirkf Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
This commit is contained in:
@@ -266,8 +266,7 @@ class SVTPlayIE(SVTPlayBaseIE):
|
|||||||
'props', 'urqlState', ..., 'data', {json.loads},
|
'props', 'urqlState', ..., 'data', {json.loads},
|
||||||
'detailsPageByPath', {dict}, any, {require('video data')}))
|
'detailsPageByPath', {dict}, any, {require('video data')}))
|
||||||
details = traverse_obj(data, (
|
details = traverse_obj(data, (
|
||||||
'modules', lambda _, v: v['details']['smartStart']['item']['videos'],
|
'modules', lambda _, v: v['details']['smartStart']['item']['videos'], 'details', any))
|
||||||
'details', {dict}, any))
|
|
||||||
svt_id = traverse_obj(details, (
|
svt_id = traverse_obj(details, (
|
||||||
'smartStart', 'item', 'videos',
|
'smartStart', 'item', 'videos',
|
||||||
# There can be 'AudioDescribed' and 'SignInterpreted' variants; try 'Default' or else get first
|
# There can be 'AudioDescribed' and 'SignInterpreted' variants; try 'Default' or else get first
|
||||||
|
|||||||
Reference in New Issue
Block a user