[youtube] Fix category extraction
This commit is contained in:
parent
3e7c12240c
commit
55f7bd2dcc
1 changed files with 3 additions and 1 deletions
|
@ -786,7 +786,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
||||||
upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())
|
upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())
|
||||||
upload_date = unified_strdate(upload_date)
|
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:
|
if m_cat_container:
|
||||||
category = self._html_search_regex(
|
category = self._html_search_regex(
|
||||||
r'(?s)<a[^<]+>(.*?)</a>', m_cat_container, 'category',
|
r'(?s)<a[^<]+>(.*?)</a>', m_cat_container, 'category',
|
||||||
|
|
Loading…
Reference in a new issue