Skip to content

Commit 4308903

Browse files
Added start point for the video playlist
1 parent e247b63 commit 4308903

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Download playlist from cmd using python/playlist.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def main():
128128
prefix = "https://www.youtube.com"
129129
opts = ''
130130
args = ''
131+
start = 0
132+
end = 0
131133
path = "playlist"
132134
# url = input("Enter the Youtube-url\n")
133135
# name = input("Enter the name for the video\n")
@@ -138,6 +140,8 @@ def main():
138140
help="Complete download link of the playlist", type=str)
139141
parser.add_argument('-l', '--list', nargs='?',
140142
help="List id of the playlist", type=str)
143+
parser.add_argument('-s', '--start', nargs='?',
144+
help="Start no. of playlist", type=int)
141145
args = parser.parse_args()
142146

143147
if args.url:
@@ -147,6 +151,9 @@ def main():
147151
else:
148152
print(parser.parse_args(['--help']))
149153

154+
if args.start:
155+
start = args.start
156+
150157
try:
151158

152159
# Phantom JS
@@ -184,6 +191,9 @@ def main():
184191
os.system('mkdir %s' % path)
185192

186193
for i, (_url) in enumerate(_urls):
194+
if i + 1 < start:
195+
continue
196+
187197
_name = _url.string.replace('\n', '').replace(
188198
' ', '').replace(',', '').replace('.', '')
189199

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy