aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/yt_data_extract
diff options
context:
space:
mode:
authorJames Taylor <28744867+user234683@users.noreply.github.com>2020-10-21 09:57:49 -0700
committerGitHub <noreply@github.com>2020-10-21 09:57:49 -0700
commitf01ef36a37c9112eca3f85d49622c41d68000a69 (patch)
treef62f99169397b3779a5a9c2db4dca9beb0a86b56 /youtube/yt_data_extract
parentc696db3e84d91092182adbeb7eef6126fad6be5d (diff)
parenta27b575380378f1b490dcabb8cc67f05adee5daa (diff)
downloadyt-local-f01ef36a37c9112eca3f85d49622c41d68000a69.tar.lz
yt-local-f01ef36a37c9112eca3f85d49622c41d68000a69.tar.xz
yt-local-f01ef36a37c9112eca3f85d49622c41d68000a69.zip
Merge pull request #34 from zrose584/rm_whitespaces
remove trailing whitespaces
Diffstat (limited to 'youtube/yt_data_extract')
-rw-r--r--youtube/yt_data_extract/common.py2
-rw-r--r--youtube/yt_data_extract/everything_else.py2
-rw-r--r--youtube/yt_data_extract/watch_extraction.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/youtube/yt_data_extract/common.py b/youtube/yt_data_extract/common.py
index 9610479..683b1c6 100644
--- a/youtube/yt_data_extract/common.py
+++ b/youtube/yt_data_extract/common.py
@@ -295,7 +295,7 @@ def extract_item_info(item, additional_info={}):
info['duration'] = extract_str(item.get('lengthText'))
# if it's an item in a playlist, get its index
- if 'index' in item: # url has wrong index on playlist page
+ if 'index' in item: # url has wrong index on playlist page
info['index'] = extract_int(item.get('index'))
elif 'indexText' in item:
# Current item in playlist has ▶ instead of the actual index, must
diff --git a/youtube/yt_data_extract/everything_else.py b/youtube/yt_data_extract/everything_else.py
index d91dad5..b4b612d 100644
--- a/youtube/yt_data_extract/everything_else.py
+++ b/youtube/yt_data_extract/everything_else.py
@@ -164,7 +164,7 @@ def extract_playlist_metadata(polymer_json):
metadata['video_count'] = extract_int(header.get('numVideosText'))
metadata['description'] = extract_str(header.get('descriptionText'), default='')
metadata['author'] = extract_str(header.get('ownerText'))
- metadata['author_id'] = multi_deep_get(header,
+ metadata['author_id'] = multi_deep_get(header,
['ownerText', 'runs', 0, 'navigationEndpoint', 'browseEndpoint', 'browseId'],
['ownerEndpoint', 'browseEndpoint', 'browseId'])
if metadata['author_id']:
diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py
index f89cec1..5e57c15 100644
--- a/youtube/yt_data_extract/watch_extraction.py
+++ b/youtube/yt_data_extract/watch_extraction.py
@@ -172,7 +172,7 @@ def _extract_watch_info_mobile(top_level):
else:
info['playlist'] = {}
info['playlist']['title'] = playlist.get('title')
- info['playlist']['author'] = extract_str(multi_get(playlist,
+ info['playlist']['author'] = extract_str(multi_get(playlist,
'ownerName', 'longBylineText', 'shortBylineText', 'ownerText'))
author_id = deep_get(playlist, 'longBylineText', 'runs', 0,
'navigationEndpoint', 'browseEndpoint', 'browseId')