❗There is a new version of the app that provides the same functionality use: https://github.com./bython17/cwm-downloader from now on.
This project is created for people that bought a course from https://codewithmosh.com and want to download a single lecture or a whole course just using the command line
Clone the project
git clone https://github.com./bython17/cwm-downloader/
Go to the project directory
cd cwm-downloader
Add a credentials.py
file
-> credentials.py
is the file that contains the header and cookie dictionaries in order to simulate a "signed in" user.
To get the header and cookies dictionary
-
Sign in to your account and go to an enrolled course that you have purchased
-
Inspect the page and go the Networks tab
-
Right click on the first request
-
Copy the cURL of the request
-
Go to https://curlconvertor.com and paste the cURL (that you copied)
-
From the site copy the generated cookies and headers dictionary
-
Create a
credentials.py
file in the same directory as the project source -
Paste the contents you copied from the website
beautifulsoup4, tqdm, requests, colorama
python -m pip install beautifulsoup4 tqdm requests colorama
You can either run the main.py
script directly using python or compile the app to a binary. To do that:
Install pyinstaller
python -m pip install pyinstaller
Navigate to the project directory and run
pyinstaller --noconfirm --onefile --console main.py
Add the destination directory to PATH
or move the binary to a directory that is already added to the PATH
in order to access the command from wherever you want.