aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/yt_data_extract/common.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-05-15 15:10:40 -0700
committerJesús <heckyel@hyperbola.info>2021-05-17 22:02:03 -0500
commitf0cd170767d40047279335d1439f77ca0eadfa18 (patch)
tree4a80b7dde63de90a74d6ce528c2f88aa71322897 /youtube/yt_data_extract/common.py
parent37f7a4c1cf067fdbd54e6bbb486d6cc2cee8d451 (diff)
downloadyt-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>
Diffstat (limited to 'youtube/yt_data_extract/common.py')
-rw-r--r--youtube/yt_data_extract/common.py5
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):