Fix videos added to playlist from channel page not having author
Information from additional_info was being overrided with None. Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
parent
37f7a4c1cf
commit
f0cd170767
@ -213,8 +213,6 @@ def extract_item_info(item, additional_info={}):
|
|||||||
info['type'] = 'unsupported'
|
info['type'] = 'unsupported'
|
||||||
return info
|
return info
|
||||||
|
|
||||||
info.update(additional_info)
|
|
||||||
|
|
||||||
# type looks like e.g. 'compactVideoRenderer' or 'gridVideoRenderer'
|
# type looks like e.g. 'compactVideoRenderer' or 'gridVideoRenderer'
|
||||||
# camelCase split, https://stackoverflow.com/a/37697078
|
# camelCase split, https://stackoverflow.com/a/37697078
|
||||||
type_parts = [s.lower() for s in re.sub(r'([A-Z][a-z]+)', r' \1', type).split()]
|
type_parts = [s.lower() for s in re.sub(r'([A-Z][a-z]+)', r' \1', type).split()]
|
||||||
@ -335,6 +333,9 @@ def extract_item_info(item, additional_info={}):
|
|||||||
conservative_update(info, 'video_count', extract_int(deep_get(
|
conservative_update(info, 'video_count', extract_int(deep_get(
|
||||||
overlay, 'thumbnailOverlayBottomPanelRenderer', 'text'
|
overlay, 'thumbnailOverlayBottomPanelRenderer', 'text'
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
info.update(additional_info)
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
def extract_response(polymer_json):
|
def extract_response(polymer_json):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user