[generic] Allow further processing of json_ld URL

Closes #2578
This commit is contained in:
pukkandan
2022-02-02 07:28:01 +05:30
parent d16df59db5
commit 85553414ae
2 changed files with 6 additions and 3 deletions

View File

@@ -1447,7 +1447,7 @@ class InfoExtractor(object):
'title': part.get('name'),
'start_time': part.get('startOffset'),
'end_time': part.get('endOffset'),
} for part in e.get('hasPart', []) if part.get('@type') == 'Clip']
} for part in variadic(e.get('hasPart') or []) if part.get('@type') == 'Clip']
for idx, (last_c, current_c, next_c) in enumerate(zip(
[{'end_time': 0}] + chapters, chapters, chapters[1:])):
current_c['end_time'] = current_c['end_time'] or next_c['start_time']