aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/InfoExtractors.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-04-23 13:54:17 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-04-23 13:54:17 +0200
commit7b670a4483d589af822e7fc061d1d3d3aafd36f0 (patch)
treeeb3936ada4eba08b52b1e296de69d64221b2463f /youtube_dl/InfoExtractors.py
parent69fc019f268116a4b5dcccca00ddf9153748c305 (diff)
YouTube: Fall back to <meta> description if video is rated (Fixes #800)
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
-rwxr-xr-xyoutube_dl/InfoExtractors.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index 208b44887..d5876ad34 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -570,7 +570,11 @@ class YoutubeIE(InfoExtractor):
if video_description:
video_description = clean_html(video_description)
else:
- video_description = u''
+ fd_mobj = re.search(r'<meta name="description" content="([^"]+)"', video_webpage)
+ if fd_mobj:
+ video_description = unescapeHTML(fd_mobj.group(1))
+ else:
+ video_description = u''
# subtitles
video_subtitles = None