def get_videos(url):
"""Download all videos in the course.
"""
# Lynda.com login and video filename options
options = {
'username': USERNAME,
'password': PASSWORD,
'outtmpl': u'%(playlist_index)s-%(title)s.%(ext)s',
'writesubtitles': SUBTITLES,
'allsubtitles': SUBTITLES,
'download_archive': ARCHIVE,
'external_downloader': EXTERNAL_DL
}
try:
with youtube_dl.YoutubeDL(options) as ydl:
ydl.download([url])
except:
print('Could not download the video in course: {}'.format(url))
评论列表
文章目录