diff options
author | James Taylor <user234683@users.noreply.github.com> | 2021-05-15 15:10:40 -0700 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-05-17 22:02:03 -0500 |
commit | f0cd170767d40047279335d1439f77ca0eadfa18 (patch) | |
tree | 4a80b7dde63de90a74d6ce528c2f88aa71322897 | |
parent | 37f7a4c1cf067fdbd54e6bbb486d6cc2cee8d451 (diff) | |
download | yt-local-f0cd170767d40047279335d1439f77ca0eadfa18.tar.lz yt-local-f0cd170767d40047279335d1439f77ca0eadfa18.tar.xz yt-local-f0cd170767d40047279335d1439f77ca0eadfa18.zip |
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>
-rw-r--r-- | youtube/yt_data_extract/common.py | 5 |
1 files changed, 3 insertions, 2 deletions
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): |