Skip to content

Download codepens in a single html file

Notifications You must be signed in to change notification settings

adevra/Codepen-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Codepen Downloader 📩

A simple Node.js script that downloads and cleans CodePen HTML files, also removing unnecessary <canvas> elements while keeping Three.js functionality intact.


Installation

  1. Clone the repository

    git clone https://github.com/adevra/Codepen-Downloader.git
    cd codepen-downloader
  2. Install dependencies

    npm install

Usage

Run the script and enter the CodePen URL when prompted:

node download.js

OR provide the URL directly:

node download.js "https://codepen.io/username/pen/id"

Output

The cleaned HTML file will be saved as:

cleaned_codepen.html

Open it in a browser to see the saved CodePen.


Troubleshooting

  • If puppeteer-extra fails to install, run:
    npm install puppeteer puppeteer-core [email protected] puppeteer-extra-plugin-stealth jsdom
  • If Node.js shows a module warning, add "type": "module" to package.json.

License

MIT License – Free to use and modify.

About

Download codepens in a single html file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published