Skip to content

Commit

Permalink
[extractor] Extract video inside Article json_ld
Browse files Browse the repository at this point in the history
  • Loading branch information
pukkandan committed Jan 23, 2022
1 parent af6793f commit 2edb38e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yt_dlp/extractor/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2edb38e

Please sign in to comment.