[youtube] Fix category extraction
This commit is contained in:
parent
b477fc1314
commit
1dda2c9eda
@ -2347,6 +2347,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
r'(?s)<a[^<]+>(.*?)</a>', m_cat_container, 'category',
|
||||
default=None)
|
||||
video_categories = None if category is None else [category]
|
||||
else:
|
||||
category = clean_html(try_get(
|
||||
player_response,
|
||||
lambda x: x['microformat']['playerMicroformatRenderer']['category'],
|
||||
compat_str))
|
||||
if category:
|
||||
video_categories = None if category is None else [category]
|
||||
else:
|
||||
video_categories = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user