mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[youtube] save keywords in info jason when --write-info-json is used
This commit is contained in:
parent
289bbb350e
commit
f171bc8b59
1 changed files with 4 additions and 0 deletions
|
@ -1072,6 +1072,9 @@ def add_dash_mpd(video_info):
|
|||
else:
|
||||
video_categories = None
|
||||
|
||||
m = re.findall(r'''<meta(?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]+|="[^"]+"|='[^']+'))*?\s+property=['"]?og:video:tag['"]?(?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]+|="[^"]+"|='[^']+'))*?\s+content=['"]?([^>'"]+?)['"]?\s*>'''
|
||||
, video_webpage, re.DOTALL | re.IGNORECASE);
|
||||
video_tags = ", ".join(m)
|
||||
# description
|
||||
video_description = get_element_by_id("eow-description", video_webpage)
|
||||
if video_description:
|
||||
|
@ -1259,6 +1262,7 @@ def _map_to_format_list(urlmap):
|
|||
'title': video_title,
|
||||
'thumbnail': video_thumbnail,
|
||||
'description': video_description,
|
||||
'tags' : video_tags,
|
||||
'categories': video_categories,
|
||||
'subtitles': video_subtitles,
|
||||
'automatic_captions': automatic_captions,
|
||||
|
|
Loading…
Reference in a new issue