vik-y
3/29/2015 - 5:19 PM

To download a list of files from youtube

To download a list of files from youtube

'''
Copy the list from youtube and save it in a file urls.txt
Run this script to get all the urls
Put them in a file and run youtube-dl --playlist-start <number> --playlist-end <number> -a "filename.txt"
Download entire playlist
'''

from BeautifulSoup import BeautifulSoup

a = open('urls.txt', 'r')
b = a.read()
soup = BeautifulSoup(b)

urls = soup.findAll('a', {'class':'playlist-video clearfix  spf-link '})

print urls

for val in urls:
	print "http://youtube.com"+val['href']