From f0cd170767d40047279335d1439f77ca0eadfa18 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 15 May 2021 15:10:40 -0700 Subject: Fix videos added to playlist from channel page not having author MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Information from additional_info was being overrided with None. Signed-off-by: Jesús --- youtube/yt_data_extract/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'youtube') diff --git a/youtube/yt_data_extract/common.py b/youtube/yt_data_extract/common.py index 2b394e6..b1cf31c 100644 --- a/youtube/yt_data_extract/common.py +++ b/youtube/yt_data_extract/common.py @@ -213,8 +213,6 @@ def extract_item_info(item, additional_info={}): info['type'] = 'unsupported' return info - info.update(additional_info) - # type looks like e.g. 'compactVideoRenderer' or 'gridVideoRenderer' # 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()] @@ -335,6 +333,9 @@ def extract_item_info(item, additional_info={}): conservative_update(info, 'video_count', extract_int(deep_get( overlay, 'thumbnailOverlayBottomPanelRenderer', 'text' ))) + + info.update(additional_info) + return info def extract_response(polymer_json): -- cgit v1.2.3