From 2edb38e8caa8cadd3a2effd75d8bf47e31f94f9c Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 24 Jan 2022 01:40:05 +0530 Subject: [PATCH] [extractor] Extract video inside `Article` json_ld Closes #2448 --- yt_dlp/extractor/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 77e358bbe3..bd9362827d 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1528,6 +1528,8 @@ def traverse_json_ld(json_ld, at_top_level=True): 'title': unescapeHTML(e.get('headline')), 'description': unescapeHTML(e.get('articleBody') or e.get('description')), }) + if traverse_obj(e, ('video', 0, '@type')) == 'VideoObject': + extract_video_object(e['video'][0]) elif item_type == 'VideoObject': extract_video_object(e) if expected_type is None: