aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2015-07-28 18:14:06 +0300
committerPurdea Andrei <andrei@purdea.ro>2015-07-28 18:14:06 +0300
commitf171bc8b59ecf4560dd4076be56570a4f090d519 (patch)
tree676b43bf66658e2e0798349973be65979b45874f /youtube_dl/extractor/youtube.py
parent289bbb350e11ae1460db515560345088d7c58663 (diff)
downloadyoutube-dl-f171bc8b59ecf4560dd4076be56570a4f090d519.tar.xz
[youtube] save keywords in info jason when --write-info-json is used
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 0e411bfb6..15e327ec8 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1072,6 +1072,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
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 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'title': video_title,
'thumbnail': video_thumbnail,
'description': video_description,
+ 'tags' : video_tags,
'categories': video_categories,
'subtitles': video_subtitles,
'automatic_captions': automatic_captions,