npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

coursera-scraper

v1.0.5

Published

Unofficial Coursera scraper/downloader CLI for Node.js.

Readme

⚠️ Disclaimer: This project is not affiliated with, endorsed by, or sponsored by Coursera.

It uses a locally saved Coursera session, validates coursera.org/learn/... URLs, discovers course/module/lesson links, extracts video or reading content, and writes the results to local downloads/ folders. Internally, it uses Playwright for browser-driven login, navigation, and response interception.

Requirements

  • Node.js 20+
  • Google Chrome installed for Playwright's channel: "chrome" launch mode

Install

Install from npm

  1. Install the CLI globally:
npm install -g coursera-scraper
  1. Install the Chrome browser that Playwright will launch:
npx -y playwright install chrome
  1. Start the CLI:
coursera-dl

Install from source

  1. Install project dependencies:
npm install
  1. Install the Chrome browser that Playwright will launch:
npx playwright install chrome
  1. Build the TypeScript sources:
npm run build
  1. Start the CLI:
npm run cli

First run

  1. Run the CLI:
coursera-dl
  1. Choose the authentication flow when prompted, complete the login in the opened Chrome window, and wait for the CLI to confirm that your local session was saved.

  2. After login, run the CLI again and paste a course URL such as:

https://www.coursera.org/learn/course-slug/home/welcome
  1. The downloader will save output under the local downloads/ folder.

Usage

Interactive CLI:

coursera-dl

Interactive CLI from a source checkout:

npm run cli

Direct download entry point from a source checkout:

npm run download "https://www.coursera.org/learn/course-slug/home/welcome"

Queue commands:

coursera-dl queue add "https://www.coursera.org/learn/course-slug/home/welcome" --concurrency 3
coursera-dl queue list
coursera-dl queue run
coursera-dl queue remove QUEUE_ITEM_ID
coursera-dl queue retry-failed

The persistent queue is stored in ~/.coursera-scraper/queue.json, so queued links survive restarts.

Security posture

  • Session state is stored outside the repository in ~/.coursera-scraper/auth.json.
  • Downloaded filenames and folders are sanitized before being written to disk.
  • Downloads are restricted to https:// URLs, block localhost/private-network targets, cap redirects, and enforce a 2 GB per-file limit.
  • Parallel downloads are capped to reduce accidental rate spikes.

Responsible use

  • Only access content you are enrolled in and allowed to access.
  • Do not commit auth.json, screenshots, course exports, or debug dumps.
  • Check SECURITY.md before opening issues.

Open source caveats

The repository is technically safer after hardening, but publishing a public downloader for a proprietary learning platform can still carry policy, copyright, and trademark risk. This README does not hide this fact. Before making the repository public, review:

  • Coursera Terms of Use
  • any local copyright exceptions or fair-use assumptions you are relying on
  • whether the project name and README wording imply affiliation

Development

npm run scan:sensitive
npm run lint
npm run build
npm run audit:prod

License

MIT. See LICENSE.