ReneR97 / domestika-downloader

Download full domestika courses
https://www.buymeacoffee.com/ReneR97
49 stars 14 forks source link

Create index_multi.js #7

Closed Vodou4460 closed 1 year ago

Vodou4460 commented 1 year ago

This code serves as a script to scrape and download course videos from the Domestika platform. It utilizes Puppeteer for browser automation, Cheerio for HTML parsing, and various modules for downloading operations.

The script reads a list of course URLs from a file course_list.txt and iterates through each URL. For each course, it retrieves initial data, units, and videos using API calls and HTML scraping. It then creates the necessary directories and uses a command-line tool (N_m3u8DL-RE) to download the corresponding videos and subtitles.

Finally, the script updates tracking files such as log files and the downloaded course list file, and displays progress and confirmation messages as the videos are downloaded.

Note that the script relies on external dependencies and assumes the presence of specific files in the working directory.