mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 00:25:08 +00:00
[extractor/npr] Use stream url from json-ld (#3455)
Closes #1934 Authored by: r5d
This commit is contained in:
committed by
GitHub
parent
09d02ea429
commit
e50c3500b4
@ -1461,7 +1461,7 @@ class InfoExtractor:
|
||||
assert e['@type'] == 'VideoObject'
|
||||
author = e.get('author')
|
||||
info.update({
|
||||
'url': url_or_none(e.get('contentUrl')),
|
||||
'url': traverse_obj(e, 'contentUrl', 'embedUrl', expected_type=url_or_none),
|
||||
'title': unescapeHTML(e.get('name')),
|
||||
'description': unescapeHTML(e.get('description')),
|
||||
'thumbnails': [{'url': url}
|
||||
@ -1529,6 +1529,8 @@ class InfoExtractor:
|
||||
})
|
||||
if traverse_obj(e, ('video', 0, '@type')) == 'VideoObject':
|
||||
extract_video_object(e['video'][0])
|
||||
elif traverse_obj(e, ('subjectOf', 0, '@type')) == 'VideoObject':
|
||||
extract_video_object(e['subjectOf'][0])
|
||||
elif item_type == 'VideoObject':
|
||||
extract_video_object(e)
|
||||
if expected_type is None:
|
||||
|
Reference in New Issue
Block a user