mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 12:23:19 +00:00
different solution for traversal issues
This commit is contained in:
parent
4b9a54b464
commit
6ef8990320
|
@ -798,7 +798,7 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE
|
|||
'id': 'p0hj0lq7',
|
||||
'ext': 'mp4',
|
||||
'title': 'Nasser Hospital doctor describes his treatment by IDF',
|
||||
'description': r're:(?s)Doctor Abu Sabha said he was detained by Israeli forces after .{276,} hostages\."$',
|
||||
'description': r're:(?s)Doctor Abu Sabha said he was detained by Israeli forces after .{276} hostages\."$',
|
||||
'thumbnail': r're:https?://.+/.+\.jpg',
|
||||
'timestamp': 1710188248,
|
||||
'upload_date': '20240311',
|
||||
|
@ -1270,8 +1270,6 @@ def extract_all(pattern):
|
|||
|
||||
def parse_model(model):
|
||||
'''Extract single video from model structure'''
|
||||
if isinstance(model, list):
|
||||
model = model[0]
|
||||
item_id = traverse_obj(model, ('versions', 0, 'versionId', {str}))
|
||||
if not item_id:
|
||||
return
|
||||
|
@ -1298,7 +1296,7 @@ def parse_model(model):
|
|||
..., 'contents', lambda _, v: v['type'] == 'video',
|
||||
'model', 'blocks', lambda _, v: v['type'] == 'media',
|
||||
'model', 'blocks', lambda _, v: v['type'] == 'mediaMetadata',
|
||||
'model'))
|
||||
'model', {dict}, any))
|
||||
if model:
|
||||
entry = parse_model(model)
|
||||
if entry:
|
||||
|
|
Loading…
Reference in a new issue