From: Philipp Hagemeister Date: Sun, 31 Aug 2014 21:26:19 +0000 (+0200) Subject: [youtube] Fix category extraction X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=55f7bd2dccb9b0ff24074ba8e8dbe6d67ed49c0a;p=youtube-dl [youtube] Fix category extraction --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index bdabcaa27..3417c1275 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -786,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',