From: Philipp Hagemeister Date: Sun, 31 Aug 2014 21:44:06 +0000 (+0200) Subject: Merge branch 'master' of github.com:rg3/youtube-dl X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=d10548b6914d8a3c991ef5248ab66e789a680b7a;hp=e990510e6b4ea18460c81679004e6232662ae83f;p=youtube-dl Merge branch 'master' of github.com:rg3/youtube-dl --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 13676c49f..3417c1275 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -316,6 +316,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): u"upload_date": u"20121002", u"description": u"test chars: \"'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .", u"categories": [u'Science & Technology'], + 'like_count': int, + 'dislike_count': int, } }, { @@ -784,7 +786,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split()) upload_date = unified_strdate(upload_date) - m_cat_container = get_element_by_id("eow-category", video_webpage) + m_cat_container = self._search_regex( + r'(?s)]*>\s*Category\s*\s*]*>(.*?)', + video_webpage, 'categories', fatal=False) if m_cat_container: category = self._html_search_regex( r'(?s)(.*?)', m_cat_container, 'category',