Skip to content

Commit dce671c

Browse files
authored
Merge pull request #2 from ByteTrix/multi-dwl
Multi dwl
2 parents 409ce19 + 78eccab commit dce671c

7 files changed

Lines changed: 280 additions & 25 deletions

File tree

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Thinkific-Downloader Environment Configuration
2+
# 🔧 IMPORTANT: See ENV_SETUP.md for complete step-by-step setup instructions
23
# Copy this file to .env and fill in your actual values
34

45
# ===============================================
5-
# REQUIRED AUTHENTICATION
6+
# REQUIRED AUTHENTICATION
67
# ===============================================
8+
# ⚠️ NEED HELP? Follow the complete guide: ENV_SETUP.md
79

810
# For downloading all content, use the course link.
911
COURSE_LINK="https://your-thinkific-site.com/api/course_player/v2/courses/your-course-name"

.github/workflows/release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- 'v*.*.*'
77

8+
permissions:
9+
contents: write
10+
packages: write
11+
812
jobs:
913
release:
1014
name: 📦 Create Release
@@ -19,12 +23,10 @@ jobs:
1923
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
2024

2125
- name: 🎉 Create Release
22-
uses: actions/create-release@v1
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
uses: softprops/action-gh-release@v2
2527
with:
2628
tag_name: ${{ steps.version.outputs.tag }}
27-
release_name: 🚀 Release ${{ steps.version.outputs.tag }}
29+
name: 🚀 Release ${{ steps.version.outputs.tag }}
2830
body: |
2931
## 🎉 New Release: ${{ steps.version.outputs.tag }}
3032
@@ -39,14 +41,14 @@ jobs:
3941
4042
**GitHub Packages:**
4143
```bash
42-
docker pull ghcr.io/itskavin/thinkific-downloader:${{ steps.version.outputs.tag }}
44+
docker pull ghcr.io/bytetrix/thinkific-downloader:${{ steps.version.outputs.tag }}
4345
# or
44-
docker pull ghcr.io/itskavin/thinkific-downloader:latest
46+
docker pull ghcr.io/bytetrix/thinkific-downloader:latest
4547
```
4648
4749
**Setup and Run:**
4850
```bash
49-
git clone https://github.com/itskavin/Thinkific-Downloader.git
51+
git clone https://github.com/ByteTrix/Thinkific-Downloader.git
5052
cd Thinkific-Downloader
5153
cp .env.example .env
5254
# Edit .env with your details
@@ -55,7 +57,7 @@ jobs:
5557
5658
**Python Direct:**
5759
```bash
58-
git clone https://github.com/itskavin/Thinkific-Downloader.git
60+
git clone https://github.com/ByteTrix/Thinkific-Downloader.git
5961
cd Thinkific-Downloader
6062
pip install -r requirements.txt
6163
python thinkificdownloader.py
@@ -83,7 +85,8 @@ jobs:
8385
id: version
8486
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
8587

86-
- name: 🔑 Login to Docker Hub
88+
- name: 🔑 Login to Docker Hub (Optional)
89+
continue-on-error: true
8790
uses: docker/login-action@v3
8891
with:
8992
username: ${{ secrets.DOCKER_USERNAME }}
@@ -96,7 +99,8 @@ jobs:
9699
username: ${{ github.actor }}
97100
password: ${{ secrets.GITHUB_TOKEN }}
98101

99-
- name: 🔧 Build and Push to Docker Hub
102+
- name: 🔧 Build and Push to Docker Hub (Optional)
103+
continue-on-error: true
100104
run: |
101105
docker build -t kvnxo/thinkific-downloader:latest .
102106
docker build -t kvnxo/thinkific-downloader:${{ steps.version.outputs.tag }} .

DEVELOPMENT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ pip install pre-commit
113113
pre-commit install
114114
```
115115

116+
### **2.1 Environment Configuration**
117+
118+
**🔧 For testing and development**, you'll need to set up authentication:
119+
- **Production Guide**: [ENV_SETUP.md](ENV_SETUP.md) - Complete setup for end users
120+
- **Development**: Copy `.env.example` to `.env` and configure for your test course
121+
116122
### **3. IDE Configuration**
117123

118124
#### **VS Code Settings** (`.vscode/settings.json`)

ENV_SETUP.md

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# 🔧 Environment Setup Guide
2+
3+
This guide will walk you through setting up the required environment variables to download courses from Thinkific-based platforms.
4+
5+
## **Reference Video (Optional)**
6+
7+
For a general overview of using browser DevTools to extract authentication data, you can watch this reference video: **[How to Extract Authentication Data from Browser](https://youtu.be/owi-cOcpceI?t=60)**
8+
9+
**⚠️ Important Note:** The video above is just a **general reference** for understanding browser DevTools concepts. **Follow the specific steps below for this Thinkific Downloader project**, as the exact fields and process may differ from the video.
10+
11+
---
12+
13+
## Prerequisites
14+
15+
- A web browser (Chrome, Firefox, Edge, Safari)
16+
- Access to the course you want to download
17+
- Basic knowledge of browser Developer Tools
18+
19+
## 🎯 Quick Overview
20+
21+
You need to configure 3 main variables in your `.env` file:
22+
- `COURSE_LINK` - The URL of the course
23+
- `COOKIE_DATA` - Authentication cookies from your browser
24+
- `CLIENT_DATE` - Timestamp for API requests
25+
26+
---
27+
28+
## 📝 Step-by-Step Setup
29+
30+
### **Step 1: Copy Environment Template**
31+
32+
First, create your environment file from the template:
33+
34+
```bash
35+
# Copy the example file
36+
cp .env.example .env
37+
```
38+
39+
Or manually create a `.env` file and copy the contents from `.env.example`.
40+
41+
### **Step 2: Get Course Link**
42+
43+
1. **Log into your course platform** (the Thinkific-based site)
44+
2. **Navigate to the course** you want to download
45+
3. **Copy the full URL** from your browser's address bar
46+
4. **Add it to your .env file:**
47+
```env
48+
COURSE_LINK=https://your-course-platform.com/courses/your-course-name
49+
```
50+
51+
### **Step 3: Extract Authentication Data**
52+
53+
This is the most important step. You need to capture authentication cookies and timestamp.
54+
55+
**📺 Visual Reference:** While the [video guide](https://youtu.be/owi-cOcpceI?t=60) shows similar concepts, **follow these exact steps below** for Thinkific-based platforms.
56+
57+
#### **3.1 Open Developer Tools**
58+
59+
**For Chrome/Edge:**
60+
- Press `F12` OR
61+
- Right-click → "Inspect" OR
62+
- Menu → More Tools → Developer Tools
63+
64+
**For Firefox:**
65+
- Press `F12` OR
66+
- Right-click → "Inspect Element" OR
67+
- Menu → Web Developer → Inspector
68+
69+
**For Safari:**
70+
- Enable Developer menu first: Safari → Preferences → Advanced → "Show Develop menu"
71+
- Then: Develop → Show Web Inspector
72+
73+
#### **3.2 Access Network Tab**
74+
75+
1. **Click on the "Network" tab** in Developer Tools
76+
2. **Make sure "All" or "XHR" filter is selected**
77+
3. **Clear any existing logs** (click the clear button 🗑️)
78+
79+
#### **3.3 Trigger Course Data Request**
80+
81+
1. **Refresh the course page** (F5 or Ctrl+R)
82+
2. **OR navigate to any lesson** within the course
83+
3. **Wait for the page to fully load**
84+
85+
#### **3.4 Find the API Request**
86+
87+
1. **In the Network tab, look for a request containing:**
88+
```
89+
course_player/v2/courses/
90+
```
91+
92+
2. **It might look like:**
93+
- `course_player/v2/courses/123456`
94+
- `course_player/v2/courses/your-course-id`
95+
96+
3. **Click on this request** to select it
97+
98+
#### **3.5 Extract Cookie Data**
99+
100+
1. **Click on the request** you found
101+
2. **Look for the "Headers" section** (or click "Headers" tab)
102+
3. **Find "Request Headers" section**
103+
4. **Look for the "cookie:" line** (it will be long)
104+
5. **Copy the entire cookie value** (everything after "cookie: ")
105+
106+
```env
107+
COOKIE_DATA=_session_id=abc123...; user_token=xyz789...;
108+
```
109+
110+
**⚠️ Important:**
111+
- Copy the ENTIRE cookie string
112+
- It should be very long (several hundred characters)
113+
- Include all parts separated by semicolons
114+
115+
#### **3.6 Extract Client Date**
116+
117+
1. **In the same request headers section**
118+
2. **Look for "Response Headers"**
119+
3. **Find the "date:" field**
120+
4. **Copy the date value**
121+
122+
```env
123+
CLIENT_DATE=Wed, 25 Sep 2024 10:30:45 GMT
124+
```
125+
126+
---
127+
128+
## 🔍 Alternative Method: Raw View
129+
130+
If you're having trouble finding the headers:
131+
132+
1. **Click on the course_player request**
133+
2. **Click "Raw" tab** (if available)
134+
3. **Look for lines starting with:**
135+
- `cookie: ` (copy everything after this)
136+
- `date: ` (copy everything after this)
137+
138+
---
139+
140+
## ✅ Final Environment File
141+
142+
Your `.env` file should look like this:
143+
144+
```env
145+
# Course Configuration
146+
COURSE_LINK=https://your-platform.com/courses/your-course
147+
148+
# Authentication (Required)
149+
COOKIE_DATA=_session_id=abcd1234...; user_token=xyz789...; other_cookies=values...
150+
CLIENT_DATE=Wed, 25 Sep 2024 10:30:45 GMT
151+
152+
# Download Settings (Optional)
153+
OUTPUT_DIR=./downloads
154+
CONCURRENT_DOWNLOADS=3
155+
RETRY_ATTEMPTS=3
156+
RESUME_PARTIAL=true
157+
RATE_LIMIT_MB_S=10.0
158+
DEBUG=false
159+
```
160+
161+
---
162+
163+
## 🚨 Troubleshooting
164+
165+
**📺 Need visual help?** The [reference video](https://youtu.be/owi-cOcpceI?t=60) shows general DevTools concepts, but **follow our specific steps above** for this project.
166+
167+
### **Problem: Can't find course_player request**
168+
169+
**Solutions:**
170+
1. Make sure you're logged into the course
171+
2. Try navigating to different lessons
172+
3. Refresh the page with Network tab open
173+
4. Check if the URL pattern is slightly different (search for "course" in Network tab)
174+
175+
### **Problem: Cookies not working**
176+
177+
**Solutions:**
178+
1. Make sure you copied the ENTIRE cookie string
179+
2. Cookies expire - get fresh ones
180+
3. Try logging out and back in, then repeat the process
181+
182+
### **Problem: Invalid date format**
183+
184+
**Solutions:**
185+
1. Copy the exact date format from the response headers
186+
2. It should look like: `Wed, 25 Sep 2024 10:30:45 GMT`
187+
3. Don't modify the format
188+
189+
### **Problem: Download fails with authentication errors**
190+
191+
**Solutions:**
192+
1. Refresh your cookies (they might have expired)
193+
2. Make sure you have access to the course
194+
3. Check that COURSE_LINK points to the correct course
195+
196+
---
197+
198+
## 🔒 Security Notes
199+
200+
- **Keep your .env file private** - it contains your authentication data
201+
- **Don't commit .env to version control** (it's in .gitignore by default)
202+
- **Cookies expire** - you may need to refresh them periodically
203+
- **Only use on courses you have legitimate access to**
204+
205+
---
206+
207+
## 🎯 Quick Validation
208+
209+
Test your setup by running:
210+
211+
```bash
212+
# Docker
213+
docker-compose up
214+
215+
# Python
216+
python thinkificdownloader.py
217+
```
218+
219+
If authentication works, you should see course information being fetched. If not, double-check your cookie data.
220+
221+
---
222+
223+
## 📞 Need Help?
224+
225+
- 🐛 **Issues**: [Report Problems](https://github.com/ByteTrix/Thinkific-Downloader/issues)
226+
- 💬 **Questions**: [Community Discussions](https://github.com/ByteTrix/Thinkific-Downloader/discussions)
227+
- 📚 **Documentation**: [Main README](README.md)
228+
229+
---
230+
231+
**⚡ Pro Tip:** Bookmark this guide! You'll need to refresh your cookies periodically as they expire.

0 commit comments

Comments
 (0)