diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-09-19 11:41:16 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-09-19 11:41:16 -0700 |
commit | 61c50e0b540fa7ebabadb870c6aeb38b87d4912c (patch) | |
tree | 5837c25605dd904ca3bf157a174be2ff9b64528e /youtube/util.py | |
parent | dc6c370152d063ad4198c747fc12eb06fc1ec0e4 (diff) | |
download | yt-local-61c50e0b540fa7ebabadb870c6aeb38b87d4912c.tar.lz yt-local-61c50e0b540fa7ebabadb870c6aeb38b87d4912c.tar.xz yt-local-61c50e0b540fa7ebabadb870c6aeb38b87d4912c.zip |
Extraction: Move comment extraction to yt_data_extract
Diffstat (limited to 'youtube/util.py')
-rw-r--r-- | youtube/util.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/youtube/util.py b/youtube/util.py index a81ae83..5b63e2a 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -277,15 +277,6 @@ def video_id(url): url_parts = urllib.parse.urlparse(url) return urllib.parse.parse_qs(url_parts.query)['v'][0] -def default_multi_get(object, *keys, default): - ''' Like dict.get(), but for nested dictionaries/sequences, supporting keys or indices. Last argument is the default value to use in case of any IndexErrors or KeyErrors ''' - try: - for key in keys: - object = object[key] - return object - except (IndexError, KeyError): - return default - # default, sddefault, mqdefault, hqdefault, hq720 def get_thumbnail_url(video_id): |