aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/util.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-09-19 11:41:16 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-09-19 11:41:16 -0700
commit61c50e0b540fa7ebabadb870c6aeb38b87d4912c (patch)
tree5837c25605dd904ca3bf157a174be2ff9b64528e /youtube/util.py
parentdc6c370152d063ad4198c747fc12eb06fc1ec0e4 (diff)
downloadyt-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.py9
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):