diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-04-23 13:54:17 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-04-23 13:54:17 +0200 |
commit | 7b670a4483d589af822e7fc061d1d3d3aafd36f0 (patch) | |
tree | eb3936ada4eba08b52b1e296de69d64221b2463f /youtube_dl/InfoExtractors.py | |
parent | 69fc019f268116a4b5dcccca00ddf9153748c305 (diff) |
YouTube: Fall back to <meta> description if video is rated (Fixes #800)
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 6 |
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 |