diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-08-31 23:26:19 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-08-31 23:26:19 +0200 |
commit | 55f7bd2dccb9b0ff24074ba8e8dbe6d67ed49c0a (patch) | |
tree | af1517e3df37fdae4b7d617113853ef91288a5d4 /youtube_dl/extractor/youtube.py | |
parent | 3e7c12240c7b23913a8a9df2ded21dfae7624d84 (diff) |
[youtube] Fix category extraction
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 3 insertions, 1 deletions
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)<h4[^>]*>\s*Category\s*</h4>\s*<ul[^>]*>(.*?)</ul>', + video_webpage, 'categories', fatal=False) if m_cat_container: category = self._html_search_regex( r'(?s)<a[^<]+>(.*?)</a>', m_cat_container, 'category', |