A php based utility to download courses from Thinkific based sites like PacktPub for personal offline use.
If you want to support the project, consider buying me some coffee for motivation!
If you are a course maintainer and want to migrate from Thinkific, ping me at hello@sumeetnaik.com
First clone the repo or download the zip file and unpack it.
- Clone this repo or download the zip file.
- If you have PHP >= 7.4.13 installed locally in your system, you can use this script directly. Skip to step 4(b).
- Install Docker: docker.com, and ffmpeg: ffmpeg.org. (ffmpeg is optional, but recommended for merging audio and video files of presentations)
Now you're ready to set your .env
file and use the solution (Docker or Direct).
In the folder, you'll fine a .env file. If you're not seeing it, open it with a terminal, or enable "Show hidden files" on your operation system. If you're going to use the direct php method, you'll need to update the config.php instead.
- Open up your browser, and open the Dev Tool. If you're unsure on how to do that, search for "Dev Tool {BROWSER NAME}" on Google. Normally F12 will open it.
- Go to the "Network tab"
- Search after
course_player/v2/courses/
- Click on the matched request (there should be one)
- I'd suggest to click on the "Raw"
- First adjust the COURSE_LINK in the .env file
- Now look after the "set-cookie" and copy the valye into "COOKIE_DATA"
- Lastly copy the "date" value into "CLIENT_DATE"
At this point, you should have changed the value of COURSE_LINK
, COOKIE_DATA
and CLIENT_DATA
.
The blank version of the .env file looks like this:
COURSE_LINK=""
# If using selective download, add the following line and add the path of course data file downloaded from Thinki-Parser
COURSE_DATA_FILE=""
# Watch YouTube video to know how to get the client date and cookie data
CLIENT_DATE=""
COOKIE_DATA=""
# Set the video download quality. Default is 720p.
# Available Options: "Original File", "1080p", "720p", "540p", "360p", "224p"
VIDEO_DOWNLOAD_QUALITY="720p"
If you want to merge audio and video files of presentations, install ffmpeg and set the following flag to true in config.php file, modify the following lines:
$FFMPEG_PRESENTATION_MERGE_FLAG = true;
ffmpeg are already included in the Docker image.
If you'd like to make a selective download, please checkout Thinki-Parser v0.0.1 Experimental Support and generate course data file.
Then pass --json flag and file path of course data file. There's a example for each solution below.
Remember to update the .env
and set the COURSE_DATA_FILE
variable.
Note
On some systems, docker-compose should be called with docker compose
instead of docker-compose
Start the solution with:
docker-compose -f compose.yaml up
If you'd like to us the selective JSON file, remember to set the path of the JSON file in .env as COURSE_DATA_FILE
.
Hereafter, simply fun:
docker-compose -f compose.selective.yaml up
For Direct Method, remember to edit the config.php file and modify :
$clientdate = "PASTE CLIENT DATE HERE";
$cookiedata = "PASTE COOKIE DATA HERE";
// Set the video download quality. Default is 720p.
// Available Options: "Original File", "1080p", "720p", "540p", "360p", "224p"
$video_download_quality = "720p";
// Set the following flag to true if you want to merge audio and video files of presentations
$FFMPEG_PRESENTATION_MERGE_FLAG = true;
Now simply run:
php thinkidownloader3.php LINK_HERE
If you're using the selective download method, provide the JSON path with:
php thinkidownloader3.php --json COURSE_DATA_FILE_PATH
Caution
This script only downloads enrolled courses from thinkific based website. Owner of this repository is not responsible for any misuse if you share your credentials with strangers.
The following formats are currently supported:
- Notes
- Videos
- Shared Files
- Quiz with Answers
- Presentations PDFs or PPTs (Added FFMPEG support to merge audio and video files)
- Audio
The following are currently planned:
- Discussions Page
- Surveys
- Assignments
The current solution has been tested on the following systeM:
- PHP v7.4.13 (cli) (built: Nov 24 2020 12:43:32) ( ZTS Visual C++ 2017 x64 )
- Ubuntu, CentOS 7, Windows, Manjaro
- Docker
- FFmpeg
If you like this work, consider buying me a coffee!
Thank you to all the contributors and supporters 😁!
- exetico
- chrisg
- Gregory
- MJ
- GiorgioG
- Gbemi
- Eric
- Pablo
- Philip
- AlienFever
- Ahmad
- Chris
- Eddie
- ΛLΛΠ
- Lan K.
- David
- Hassan
- Emmanuel
- Michael
- Kingsley
- Andrew
- Paras
- Thinker
- Alex
- exetico
!NEW! Thinki-Parser v0.0.1 Experimental Support Added
!FIX! "wistia" and "videoproxy" Lesson Downloads Fixed!
!HOT! Quality Selection for Video Downloads!
!HOT! Presentation Downloads with FFMPEG support to merge audio and video files!
!NEW! FFMPEG Support in Docker Image!
!FIX! Fix issues with File Names and Downloads
!NEW! Added support for mp3 in courses