From 8c7481392718d8b0a076a8e83250ce0313f8959b Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 14:46:57 +0530 Subject: [PATCH 1/7] fix: update release workflow to use modern actions --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ebe7c0..2c7d0ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: tags: - 'v*.*.*' +permissions: + contents: write + packages: write + jobs: release: name: 📦 Create Release @@ -19,12 +23,10 @@ jobs: run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - name: 🎉 Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.version.outputs.tag }} - release_name: 🚀 Release ${{ steps.version.outputs.tag }} + name: 🚀 Release ${{ steps.version.outputs.tag }} body: | ## 🎉 New Release: ${{ steps.version.outputs.tag }} From 1102676f97c026759a7309c7fed56d406148aa02 Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 14:49:13 +0530 Subject: [PATCH 2/7] fix: make Docker Hub optional, ensure GitHub Packages always works --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c7d0ca..df7bbed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,7 +85,8 @@ jobs: id: version run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - - name: 🔑 Login to Docker Hub + - name: 🔑 Login to Docker Hub (Optional) + if: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_PASSWORD }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -98,7 +99,8 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: 🔧 Build and Push to Docker Hub + - name: 🔧 Build and Push to Docker Hub (Optional) + if: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_PASSWORD }} run: | docker build -t kvnxo/thinkific-downloader:latest . docker build -t kvnxo/thinkific-downloader:${{ steps.version.outputs.tag }} . From 385053a8f83451e82032161762b4f0bdf454dcdd Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 14:52:05 +0530 Subject: [PATCH 3/7] fix: use continue-on-error instead of complex conditionals for Docker Hub --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df7bbed..53bdcde 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,7 +86,7 @@ jobs: run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - name: 🔑 Login to Docker Hub (Optional) - if: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_PASSWORD }} + continue-on-error: true uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -100,7 +100,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: 🔧 Build and Push to Docker Hub (Optional) - if: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_PASSWORD }} + continue-on-error: true run: | docker build -t kvnxo/thinkific-downloader:latest . docker build -t kvnxo/thinkific-downloader:${{ steps.version.outputs.tag }} . From a9f1c097f9c124cfa7a968c9794b495fa7546b96 Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 15:02:19 +0530 Subject: [PATCH 4/7] feat: update repository references to ByteTrix organization --- .github/workflows/release.yml | 8 ++++---- README.md | 10 +++++----- setup.py | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53bdcde..9389fa8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,14 +41,14 @@ jobs: **GitHub Packages:** ```bash - docker pull ghcr.io/itskavin/thinkific-downloader:${{ steps.version.outputs.tag }} + docker pull ghcr.io/bytetrix/thinkific-downloader:${{ steps.version.outputs.tag }} # or - docker pull ghcr.io/itskavin/thinkific-downloader:latest + docker pull ghcr.io/bytetrix/thinkific-downloader:latest ``` **Setup and Run:** ```bash - git clone https://github.com/itskavin/Thinkific-Downloader.git + git clone https://github.com/ByteTrix/Thinkific-Downloader.git cd Thinkific-Downloader cp .env.example .env # Edit .env with your details @@ -57,7 +57,7 @@ jobs: **Python Direct:** ```bash - git clone https://github.com/itskavin/Thinkific-Downloader.git + git clone https://github.com/ByteTrix/Thinkific-Downloader.git cd Thinkific-Downloader pip install -r requirements.txt python thinkificdownloader.py diff --git a/README.md b/README.md index 7bf7bf3..1cc9cd7 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ A modern, feature-rich Python utility to download courses from Thinkific platfor **Step 1: Get the Project** ```bash # Clone or download the project -git clone https://github.com/itskavin/Thinkific-Downloader.git +git clone https://github.com/ByteTrix/Thinkific-Downloader.git cd Thinkific-Downloader # Or download and extract ZIP, then navigate to project directory @@ -108,8 +108,8 @@ docker pull kvnxo/thinkific-downloader docker run -it --rm -v $(pwd)/downloads:/app/downloads --env-file .env kvnxo/thinkific-downloader # Option 2: GitHub Packages -docker pull ghcr.io/itskavin/thinkific-downloader -docker run -it --rm -v $(pwd)/downloads:/app/downloads --env-file .env ghcr.io/itskavin/thinkific-downloader +docker pull ghcr.io/bytetrix/thinkific-downloader +docker run -it --rm -v $(pwd)/downloads:/app/downloads --env-file .env ghcr.io/bytetrix/thinkific-downloader # Option 3: Docker Compose (recommended) docker-compose up @@ -119,7 +119,7 @@ docker-compose up ```bash # Step 1: Clone the project -git clone https://github.com/itskavin/Thinkific-Downloader.git +git clone https://github.com/ByteTrix/Thinkific-Downloader.git cd Thinkific-Downloader # Step 2: Install dependencies @@ -136,7 +136,7 @@ Get the latest source code: ```bash # Clone the repository -git clone https://github.com/itskavin/Thinkific-Downloader.git +git clone https://github.com/ByteTrix/Thinkific-Downloader.git cd Thinkific-Downloader # Setup and run with Docker diff --git a/setup.py b/setup.py index 6416b43..2179f93 100644 --- a/setup.py +++ b/setup.py @@ -62,9 +62,9 @@ ], keywords="thinkific downloader education video course offline", project_urls={ - "Bug Reports": "https://github.com/itskavin/Thinkific-Downloader/issues", - "Source": "https://github.com/itskavin/Thinkific-Downloader", - "Documentation": "https://github.com/itskavin/Thinkific-Downloader#readme", + "Bug Reports": "https://github.com/ByteTrix/Thinkific-Downloader/issues", + "Source": "https://github.com/ByteTrix/Thinkific-Downloader", + "Documentation": "https://github.com/ByteTrix/Thinkific-Downloader#readme", "Docker Hub": "https://hub.docker.com/r/kvnxo/thinkific-downloader", }, ) \ No newline at end of file From 0b0d8d592d765ba18f458c04ca8dcfc44a551aff Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 15:12:38 +0530 Subject: [PATCH 5/7] feat: add comprehensive environment setup guide and link throughout documentation - Created detailed ENV_SETUP.md with step-by-step browser DevTools instructions - Added prominent links to env setup guide in README.md Quick Start section - Updated all installation sections to reference the complete setup guide - Enhanced .env.example with setup guide references - Updated SETUP.md and DEVELOPMENT.md to point to the new guide - Provides clear instructions for extracting COOKIE_DATA and CLIENT_DATE from browser Network tab --- .env.example | 4 +- DEVELOPMENT.md | 6 ++ ENV_SETUP.md | 219 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 20 +++-- SETUP.md | 4 +- 5 files changed, 246 insertions(+), 7 deletions(-) create mode 100644 ENV_SETUP.md diff --git a/.env.example b/.env.example index 06d3c77..a2f30fd 100644 --- a/.env.example +++ b/.env.example @@ -1,9 +1,11 @@ # Thinkific-Downloader Environment Configuration +# 🔧 IMPORTANT: See ENV_SETUP.md for complete step-by-step setup instructions # Copy this file to .env and fill in your actual values # =============================================== -# REQUIRED AUTHENTICATION +# REQUIRED AUTHENTICATION # =============================================== +# ⚠️ NEED HELP? Follow the complete guide: ENV_SETUP.md # For downloading all content, use the course link. COURSE_LINK="https://your-thinkific-site.com/api/course_player/v2/courses/your-course-name" diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a0cdb5b..a7f231a 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -113,6 +113,12 @@ pip install pre-commit pre-commit install ``` +### **2.1 Environment Configuration** + +**🔧 For testing and development**, you'll need to set up authentication: +- **Production Guide**: [ENV_SETUP.md](ENV_SETUP.md) - Complete setup for end users +- **Development**: Copy `.env.example` to `.env` and configure for your test course + ### **3. IDE Configuration** #### **VS Code Settings** (`.vscode/settings.json`) diff --git a/ENV_SETUP.md b/ENV_SETUP.md new file mode 100644 index 0000000..5e62578 --- /dev/null +++ b/ENV_SETUP.md @@ -0,0 +1,219 @@ +# 🔧 Environment Setup Guide + +This guide will walk you through setting up the required environment variables to download courses from Thinkific-based platforms. + +## 📋 Prerequisites + +- A web browser (Chrome, Firefox, Edge, Safari) +- Access to the course you want to download +- Basic knowledge of browser Developer Tools + +## 🎯 Quick Overview + +You need to configure 3 main variables in your `.env` file: +- `COURSE_LINK` - The URL of the course +- `COOKIE_DATA` - Authentication cookies from your browser +- `CLIENT_DATE` - Timestamp for API requests + +--- + +## 📝 Step-by-Step Setup + +### **Step 1: Copy Environment Template** + +First, create your environment file from the template: + +```bash +# Copy the example file +cp .env.example .env +``` + +Or manually create a `.env` file and copy the contents from `.env.example`. + +### **Step 2: Get Course Link** + +1. **Log into your course platform** (the Thinkific-based site) +2. **Navigate to the course** you want to download +3. **Copy the full URL** from your browser's address bar +4. **Add it to your .env file:** + ```env + COURSE_LINK=https://your-course-platform.com/courses/your-course-name + ``` + +### **Step 3: Extract Authentication Data** + +This is the most important step. You need to capture authentication cookies and timestamp. + +#### **3.1 Open Developer Tools** + +**For Chrome/Edge:** +- Press `F12` OR +- Right-click → "Inspect" OR +- Menu → More Tools → Developer Tools + +**For Firefox:** +- Press `F12` OR +- Right-click → "Inspect Element" OR +- Menu → Web Developer → Inspector + +**For Safari:** +- Enable Developer menu first: Safari → Preferences → Advanced → "Show Develop menu" +- Then: Develop → Show Web Inspector + +#### **3.2 Access Network Tab** + +1. **Click on the "Network" tab** in Developer Tools +2. **Make sure "All" or "XHR" filter is selected** +3. **Clear any existing logs** (click the clear button 🗑️) + +#### **3.3 Trigger Course Data Request** + +1. **Refresh the course page** (F5 or Ctrl+R) +2. **OR navigate to any lesson** within the course +3. **Wait for the page to fully load** + +#### **3.4 Find the API Request** + +1. **In the Network tab, look for a request containing:** + ``` + course_player/v2/courses/ + ``` + +2. **It might look like:** + - `course_player/v2/courses/123456` + - `course_player/v2/courses/your-course-id` + +3. **Click on this request** to select it + +#### **3.5 Extract Cookie Data** + +1. **Click on the request** you found +2. **Look for the "Headers" section** (or click "Headers" tab) +3. **Find "Request Headers" section** +4. **Look for the "cookie:" line** (it will be long) +5. **Copy the entire cookie value** (everything after "cookie: ") + + ```env + COOKIE_DATA=_session_id=abc123...; user_token=xyz789...; + ``` + +**⚠️ Important:** +- Copy the ENTIRE cookie string +- It should be very long (several hundred characters) +- Include all parts separated by semicolons + +#### **3.6 Extract Client Date** + +1. **In the same request headers section** +2. **Look for "Response Headers"** +3. **Find the "date:" field** +4. **Copy the date value** + + ```env + CLIENT_DATE=Wed, 25 Sep 2024 10:30:45 GMT + ``` + +--- + +## 🔍 Alternative Method: Raw View + +If you're having trouble finding the headers: + +1. **Click on the course_player request** +2. **Click "Raw" tab** (if available) +3. **Look for lines starting with:** + - `cookie: ` (copy everything after this) + - `date: ` (copy everything after this) + +--- + +## ✅ Final Environment File + +Your `.env` file should look like this: + +```env +# Course Configuration +COURSE_LINK=https://your-platform.com/courses/your-course + +# Authentication (Required) +COOKIE_DATA=_session_id=abcd1234...; user_token=xyz789...; other_cookies=values... +CLIENT_DATE=Wed, 25 Sep 2024 10:30:45 GMT + +# Download Settings (Optional) +OUTPUT_DIR=./downloads +CONCURRENT_DOWNLOADS=3 +RETRY_ATTEMPTS=3 +RESUME_PARTIAL=true +RATE_LIMIT_MB_S=10.0 +DEBUG=false +``` + +--- + +## 🚨 Troubleshooting + +### **Problem: Can't find course_player request** + +**Solutions:** +1. Make sure you're logged into the course +2. Try navigating to different lessons +3. Refresh the page with Network tab open +4. Check if the URL pattern is slightly different (search for "course" in Network tab) + +### **Problem: Cookies not working** + +**Solutions:** +1. Make sure you copied the ENTIRE cookie string +2. Cookies expire - get fresh ones +3. Try logging out and back in, then repeat the process + +### **Problem: Invalid date format** + +**Solutions:** +1. Copy the exact date format from the response headers +2. It should look like: `Wed, 25 Sep 2024 10:30:45 GMT` +3. Don't modify the format + +### **Problem: Download fails with authentication errors** + +**Solutions:** +1. Refresh your cookies (they might have expired) +2. Make sure you have access to the course +3. Check that COURSE_LINK points to the correct course + +--- + +## 🔒 Security Notes + +- **Keep your .env file private** - it contains your authentication data +- **Don't commit .env to version control** (it's in .gitignore by default) +- **Cookies expire** - you may need to refresh them periodically +- **Only use on courses you have legitimate access to** + +--- + +## 🎯 Quick Validation + +Test your setup by running: + +```bash +# Docker +docker-compose up + +# Python +python thinkificdownloader.py +``` + +If authentication works, you should see course information being fetched. If not, double-check your cookie data. + +--- + +## 📞 Need Help? + +- 🐛 **Issues**: [Report Problems](https://github.com/ByteTrix/Thinkific-Downloader/issues) +- 💬 **Questions**: [Community Discussions](https://github.com/ByteTrix/Thinkific-Downloader/discussions) +- 📚 **Documentation**: [Main README](README.md) + +--- + +**⚡ Pro Tip:** Bookmark this guide! You'll need to refresh your cookies periodically as they expire. \ No newline at end of file diff --git a/README.md b/README.md index 1cc9cd7..5336052 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,8 @@ A modern, feature-rich Python utility to download courses from Thinkific platfor **⚠️ Important**: Always clone or download the project first! The application needs access to the project directory for downloads, configuration files (.env), and proper functionality. +**🔧 FIRST TIME USERS:** Before running the application, you MUST set up your environment variables. **[Follow our Complete Environment Setup Guide](ENV_SETUP.md)** for step-by-step instructions on extracting authentication data from your browser. + ### **🐳 Docker (Recommended)** **Step 1: Get the Project** @@ -96,11 +98,13 @@ cd Thinkific-Downloader **Step 2: Setup Environment** ```bash -# Create your .env file (see configuration section below) +# Create your .env file cp .env.example .env -# Edit .env with your course details +# Edit .env with your course details - See detailed guide below ``` +**📋 [Complete Environment Setup Guide](ENV_SETUP.md) ← Click here for step-by-step instructions** + **Step 3: Run with Docker** ```bash # Option 1: Docker Hub @@ -125,7 +129,11 @@ cd Thinkific-Downloader # Step 2: Install dependencies pip install -r requirements.txt -# Step 3: Configure and run +# Step 3: Configure environment +cp .env.example .env +# ⚠️ IMPORTANT: See ENV_SETUP.md for detailed configuration instructions + +# Step 4: Run the downloader # Update environment variables in .env file python thinkificdownloader.py ``` @@ -139,9 +147,9 @@ Get the latest source code: git clone https://github.com/ByteTrix/Thinkific-Downloader.git cd Thinkific-Downloader -# Setup and run with Docker +# Setup environment variables cp .env.example .env -# Edit .env with your course details +# ⚠️ IMPORTANT: Follow the complete setup guide: ENV_SETUP.md docker-compose up # Or run with Python @@ -161,6 +169,8 @@ python thinkificdownloader.py ## ⚙️ **Enhanced Configuration** +**🚨 BEFORE YOU START:** Follow our **[Complete Environment Setup Guide](ENV_SETUP.md)** for step-by-step instructions on extracting authentication data from your browser. + Configure advanced features via environment variables or `.env` file: ```bash diff --git a/SETUP.md b/SETUP.md index a1318fc..ef25816 100644 --- a/SETUP.md +++ b/SETUP.md @@ -49,9 +49,11 @@ Get the latest version directly from GitHub: 2. **Setup configuration**: ```bash cp .env.example .env - # Edit .env with your course details (see Authentication Setup below) + # ⚠️ IMPORTANT: Follow ENV_SETUP.md for detailed authentication setup ``` + **🔧 [Complete Environment Setup Guide](ENV_SETUP.md)** - Step-by-step instructions for extracting authentication data + 3. **Run with Docker** (Recommended): ```bash docker-compose up From 7ec97b98252b2685f22bac00c084ff4cd2247489 Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 15:13:34 +0530 Subject: [PATCH 6/7] docs: add reference video to ENV_SETUP guide with clear disclaimers - Added YouTube reference video link at top of ENV_SETUP.md - Included clear warnings that video is general reference only - Emphasized following specific project steps over video - Added visual reference notes in authentication section - Added troubleshooting reference while maintaining project-specific guidance --- ENV_SETUP.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ENV_SETUP.md b/ENV_SETUP.md index 5e62578..cd02387 100644 --- a/ENV_SETUP.md +++ b/ENV_SETUP.md @@ -2,7 +2,15 @@ This guide will walk you through setting up the required environment variables to download courses from Thinkific-based platforms. -## 📋 Prerequisites +## � **Reference Video (Optional)** + +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)** + +**⚠️ 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. + +--- + +## �📋 Prerequisites - A web browser (Chrome, Firefox, Edge, Safari) - Access to the course you want to download @@ -44,6 +52,8 @@ Or manually create a `.env` file and copy the contents from `.env.example`. This is the most important step. You need to capture authentication cookies and timestamp. +**📺 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. + #### **3.1 Open Developer Tools** **For Chrome/Edge:** @@ -152,6 +162,8 @@ DEBUG=false ## 🚨 Troubleshooting +**📺 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. + ### **Problem: Can't find course_player request** **Solutions:** From 78eccab25fc3781a240c91a9cd2e96e6631d25ab Mon Sep 17 00:00:00 2001 From: kavinthangavel Date: Wed, 24 Sep 2025 15:14:23 +0530 Subject: [PATCH 7/7] okay added yt --- ENV_SETUP.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ENV_SETUP.md b/ENV_SETUP.md index cd02387..869b11b 100644 --- a/ENV_SETUP.md +++ b/ENV_SETUP.md @@ -2,7 +2,7 @@ This guide will walk you through setting up the required environment variables to download courses from Thinkific-based platforms. -## � **Reference Video (Optional)** +## **Reference Video (Optional)** 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)** @@ -10,7 +10,7 @@ For a general overview of using browser DevTools to extract authentication data, --- -## �📋 Prerequisites +## Prerequisites - A web browser (Chrome, Firefox, Edge, Safari) - Access to the course you want to download