Nick Ficano
commited on
Commit
·
27b0198
1
Parent(s):
a1c74e0
add_video should be private
Browse files- pytube/api.py +9 -9
pytube/api.py
CHANGED
@@ -116,7 +116,7 @@ class YouTube(object):
|
|
116 |
if "signature=" not in url:
|
117 |
signature = self._get_cipher(stream_map["s"][i], js_url)
|
118 |
url = "{}&signature={}".format(url, signature)
|
119 |
-
self.
|
120 |
self._fmt_values.append(fmt)
|
121 |
|
122 |
@property
|
@@ -166,14 +166,6 @@ class YouTube(object):
|
|
166 |
"""
|
167 |
return self._videos
|
168 |
|
169 |
-
def add_video(self, url, filename, **kwargs):
|
170 |
-
"""Adds new video object to videos.
|
171 |
-
"""
|
172 |
-
video = Video(url, filename, **kwargs)
|
173 |
-
self._videos.append(video)
|
174 |
-
self._videos.sort()
|
175 |
-
return True
|
176 |
-
|
177 |
@property
|
178 |
def videos(self):
|
179 |
"""Returns all videos
|
@@ -365,3 +357,11 @@ class YouTube(object):
|
|
365 |
if not attr:
|
366 |
return itag, None
|
367 |
return itag, dict(zip(YT_ENCODING_KEYS, attr))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
if "signature=" not in url:
|
117 |
signature = self._get_cipher(stream_map["s"][i], js_url)
|
118 |
url = "{}&signature={}".format(url, signature)
|
119 |
+
self._add_video(url, self.filename, **fmt_data)
|
120 |
self._fmt_values.append(fmt)
|
121 |
|
122 |
@property
|
|
|
166 |
"""
|
167 |
return self._videos
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
@property
|
170 |
def videos(self):
|
171 |
"""Returns all videos
|
|
|
357 |
if not attr:
|
358 |
return itag, None
|
359 |
return itag, dict(zip(YT_ENCODING_KEYS, attr))
|
360 |
+
|
361 |
+
def _add_video(self, url, filename, **kwargs):
|
362 |
+
"""Adds new video object to videos.
|
363 |
+
"""
|
364 |
+
video = Video(url, filename, **kwargs)
|
365 |
+
self._videos.append(video)
|
366 |
+
self._videos.sort()
|
367 |
+
return True
|