Commit
·
64efd25
1
Parent(s):
1fdb1e1
Fixed flake8 errors
Browse files- pytube/playlist.py +10 -7
pytube/playlist.py
CHANGED
@@ -10,7 +10,8 @@ from pytube.__main__ import YouTube
|
|
10 |
|
11 |
class Playlist(object):
|
12 |
"""
|
13 |
-
Handles all the task of manipulating and downloading
|
|
|
14 |
"""
|
15 |
|
16 |
def __init__(self, url):
|
@@ -19,8 +20,9 @@ class Playlist(object):
|
|
19 |
|
20 |
def construct_playlist_url(self):
|
21 |
"""
|
22 |
-
There are two kinds of playlist urls in YouTube. One that
|
23 |
-
another one contains the "playlist?list="
|
|
|
24 |
:return: playlist url -> string
|
25 |
"""
|
26 |
|
@@ -34,7 +36,8 @@ class Playlist(object):
|
|
34 |
|
35 |
def populate_video_urls(self):
|
36 |
"""
|
37 |
-
Get the links of all the videos in playlist and populate video_urls
|
|
|
38 |
:return: urls -> string
|
39 |
"""
|
40 |
|
@@ -53,9 +56,9 @@ class Playlist(object):
|
|
53 |
|
54 |
def download_all(self):
|
55 |
"""
|
56 |
-
Download all the videos in the the playlist. Initially, download
|
57 |
-
720p (or highest available), later more option
|
58 |
-
resolution of choice
|
59 |
TODO: Add option to download resolution of user's choice
|
60 |
:return: None
|
61 |
"""
|
|
|
10 |
|
11 |
class Playlist(object):
|
12 |
"""
|
13 |
+
Handles all the task of manipulating and downloading
|
14 |
+
a whole YouTube playlist
|
15 |
"""
|
16 |
|
17 |
def __init__(self, url):
|
|
|
20 |
|
21 |
def construct_playlist_url(self):
|
22 |
"""
|
23 |
+
There are two kinds of playlist urls in YouTube. One that
|
24 |
+
contains watch?v= in URL, another one contains the "playlist?list="
|
25 |
+
portion. It is preferable to work with the later one.
|
26 |
:return: playlist url -> string
|
27 |
"""
|
28 |
|
|
|
36 |
|
37 |
def populate_video_urls(self):
|
38 |
"""
|
39 |
+
Get the links of all the videos in playlist and populate video_urls
|
40 |
+
list
|
41 |
:return: urls -> string
|
42 |
"""
|
43 |
|
|
|
56 |
|
57 |
def download_all(self):
|
58 |
"""
|
59 |
+
Download all the videos in the the playlist. Initially, download
|
60 |
+
resolution is 720p (or highest available), later more option
|
61 |
+
should be added to download resolution of choice
|
62 |
TODO: Add option to download resolution of user's choice
|
63 |
:return: None
|
64 |
"""
|