download.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:lynda-video-downloader 作者: 22nds 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号