[extractor] Extract video inside Article json_ld

Closes #2448
This commit is contained in:
pukkandan 2022-01-24 01:40:05 +05:30
parent af6793f804
commit 2edb38e8ca
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -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: