Skip to content

Repository files navigation

Pedmy Downloader Chrome Extension

Pedmy Downloader Chrome Extension is a Manifest V3 Chrome extension for course teams that need a controlled offline-download workflow for their own authenticated course platforms.

It is designed as a white-label foundation: keep the core downloader logic in one place, configure it for a course platform, and generate branded copies for different businesses.

Status

This is an early open-source release. The extension is usable for demos, proof-of-concept work, and platforms that expose authorized download URLs or a course manifest endpoint. It is not a DRM bypass tool.

Features

  • Demo mode with bundled sample course files
  • Generic mode that tries a manifest endpoint first, then supported page scraping
  • Manifest mode for reliable first-party course download APIs
  • Scrape mode for lesson pages that already expose direct download links
  • Authenticated-download support through the user's logged-in browser session
  • Local mock course platform for demos and regression checks
  • White-label packaging script for branded extension builds

What this extension will not do

  • It will not break DRM or platform access controls.
  • It will not convert HLS or DASH streams into downloadable files unless direct files are already exposed by the platform.
  • It cannot infer hidden backend authorization logic that only exists on a server.

Install in Chrome

  1. Clone or download this repository.
  2. Open Chrome and go to chrome://extensions.
  3. Enable Developer mode.
  4. Click Load unpacked.
  5. Select this repository folder.

Try Demo Mode

  1. Open the extension options page.
  2. Set the mode to Demo mode.
  3. Save settings.
  4. Open the extension popup.
  5. Click Download this course.

Chrome should download bundled sample files into a folder similar to:

Downloads/Your Product Name/Demo Course/

If this works, the extension download pipeline is healthy and remaining issues are likely platform-specific.

Authenticated Demo Platform

The repository includes a tiny local mock course platform so maintainers can test an authenticated course-download flow without touching a third-party site.

Start it with:

node .\scripts\mock-platform-server.js

Open:

http://127.0.0.1:4310/course/cloud-interview-masterclass

Login with:

demo@example.com
course-demo

Then:

  1. Keep the extension in Generic mode or Manifest mode.
  2. Open the mock course page.
  3. Open the extension popup.
  4. Click Download this course.

Expected output:

Downloads/Your Product Name/Cloud Interview Masterclass/

Manifest Endpoint

Use Manifest mode or Generic mode if you control the course platform. Configure the endpoint template in the extension options, for example:

/api/courses/{courseId}/offline-manifest

The endpoint may return an items shape:

{
  "items": [
    {
      "type": "video",
      "filename": "001 Welcome.mp4",
      "downloadUrl": "https://your-site.com/download/file-1"
    },
    {
      "type": "subtitle",
      "filename": "001 Welcome.en.vtt",
      "downloadUrl": "https://your-site.com/download/file-2"
    }
  ]
}

Or a lessons shape:

{
  "lessons": [
    {
      "order": 1,
      "title": "Welcome",
      "videoUrl": "https://your-site.com/download/file-1",
      "subtitles": [
        {
          "language": "en",
          "url": "https://your-site.com/download/file-2"
        }
      ],
      "attachments": [
        {
          "title": "Slides",
          "url": "https://your-site.com/download/file-3"
        }
      ]
    }
  ]
}

Scrape Mode

Use Scrape mode only when each lesson page already exposes direct downloadable file URLs.

Configure:

  • Lesson link selectors
  • Selectors that contain direct download links
  • Optional selectors to click before scraping

Examples:

Lesson link selectors:
a[href*='/lesson/'],a[href*='/lecture/']
Selectors that contain direct download links:
a[href*='download'],a[download],[data-download-url]
Optional selectors to click before scraping:
button[aria-label='More actions'],button[data-purpose='download-menu']

Generic Mode

Generic mode is the recommended default for proof-of-concept work.

It:

  1. Tries the configured manifest endpoint.
  2. Falls back to page scraping if the manifest is unavailable.
  3. Can inspect authenticated lesson-tab network responses in unpacked POCs through Chrome's debugger API.
  4. Stores which collection method worked in the last job status.

The debugger-assisted path adds a strong Chrome permission warning because it uses the page debugger backend during collection. Keep it limited to approved proof-of-concept work and review it carefully before public distribution.

White-Label Packaging

Create a branded copy with:

node .\scripts\brand-extension.js `
  --name "Acme Offline Course Downloader" `
  --action-title "Acme Downloader" `
  --description "Offline downloader for Acme Academy courses." `
  --business "Acme Academy" `
  --product "Acme Offline" `
  --course-label "program"

This creates a branded copy in:

dist/acme-offline-course-downloader

The branded copy updates:

  • manifest.json name
  • Chrome toolbar title
  • default in-extension branding

Development

There is no build step for the unpacked extension.

Useful checks:

node --check .\src\background.js
node --check .\src\popup.js
node --check .\src\options.js
node --check .\src\content.js
node --check .\src\shared.js
node --check .\scripts\mock-platform-server.js
node --check .\scripts\brand-extension.js

Roadmap

  • Add screenshots and short demo clips to the README.
  • Add automated extension smoke tests.
  • Document more manifest endpoint examples.
  • Add packaged release artifacts for Chrome Web Store review.
  • Reduce permissions where possible for production builds.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md, open an issue for larger changes, and keep security-sensitive reports out of public issues.

Security

This extension handles authenticated browser sessions and downloads. Do not report security issues publicly. See SECURITY.md for the private reporting process.

License

This project is open source under the MIT License. See LICENSE for details.

About

Manifest V3 Chrome extension for authorized offline course downloads.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages