diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-12-19 20:12:37 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-12-19 20:12:37 -0800 |
commit | 4a3529df9577b660a2f493ab63ef08f10320b38e (patch) | |
tree | 8867f9a46d639349aa756dccf2e28194cb43448e /youtube/yt_data_extract/everything_else.py | |
parent | d1d908d5b1aadb0dc75b25df1a47789c021f89e2 (diff) | |
download | yt-local-4a3529df9577b660a2f493ab63ef08f10320b38e.tar.lz yt-local-4a3529df9577b660a2f493ab63ef08f10320b38e.tar.xz yt-local-4a3529df9577b660a2f493ab63ef08f10320b38e.zip |
Extraction: Move stuff around in files and put underscores in front of internal helper function names
Move get_captions_url in watch_extraction to bottom next to other exported, public functions
Diffstat (limited to 'youtube/yt_data_extract/everything_else.py')
-rw-r--r-- | youtube/yt_data_extract/everything_else.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/yt_data_extract/everything_else.py b/youtube/yt_data_extract/everything_else.py index 6277c8d..6dc5248 100644 --- a/youtube/yt_data_extract/everything_else.py +++ b/youtube/yt_data_extract/everything_else.py @@ -192,7 +192,7 @@ def extract_playlist_info(polymer_json): return info -def ctoken_metadata(ctoken): +def _ctoken_metadata(ctoken): result = dict() params = proto.parse(proto.b64_to_bytes(ctoken)) result['video_id'] = proto.parse(params[2])[2].decode('ascii') @@ -220,7 +220,7 @@ def extract_comments_info(polymer_json): url = multi_deep_get(polymer_json, [1, 'url'], ['url']) if url: ctoken = urllib.parse.parse_qs(url[url.find('?')+1:])['ctoken'][0] - metadata = ctoken_metadata(ctoken) + metadata = _ctoken_metadata(ctoken) else: metadata = {} info['video_id'] = metadata.get('video_id') |