![]() ![]() format ( username, password, video_out, video_url )) get ( 'href' ) video_out = output_folder + '/' + module_name + '/' + video_name + '.mp4' # print(' ', domain + video_url) # print(' ', video_out) print ( "youtube-dl -u ". find_all ( 'a' )): video_name = str ( index ) + ' - ' + video. makedirs ( output_folder + '/' + module_name ) # print(module_name) for index, video in enumerate ( lesson. startswith ( 'Module' ) and not 'Summary' in lesson_name : module_name = lesson_name os. makedirs ( output_folder ) module_name = 'Module 0' for lesson in lessons : lesson_name = lesson. rmtree ( output_folder, ignore_errors = True ) os. find_all ( 'li', class_ = 'toc-level-1' ) print ( len ( lessons )) shutil. from bs4 import BeautifulSoup import requests import shutil import os url = '' domain = '' output_folder = './output' username = 'username' password = 'SuperSecretPassword' req = requests. The structure of the course material seems somewhat inconsistent, but this should be a good starting point for other courses. Only tested with this specific course, it might need some minor tweaks for other courses. Since they do not offer a way to download an entire course (except for the queue app, which is not what I’m after) I created this notebook to scratch that itch. Updating some of my certifications and wanted an offline way to watch a video course. ![]() Download all videos from Safari Books Online course ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |