
Create download scriptĪfter installing the plugin on your working directory with NPM, you will just need to create a javascript file with the code that will download some website. It is far from ideal because probably you need to wait until some resource is loaded or click some button or log in. This plugin, basically starts Chromium in headless mode which just opens page and waits until the entire page is loaded. Install the website-scraper-puppeteer library using npm in your terminal: npm install website-scraper website-scraper-puppeteerįor more information about this project, please visit the official repository at Github here. One of the most valuable advantanges of using a script that is based on Puppeteer, a headless version of Chromium, is that you will not only be able to copy static website features that implement plain JavaScript or even jQuery, but you will also be able to download the content and resources generated by dynamic pages that use React or angular. In this article, we will explain you how to easily implement your own website cloner with Node.js. So, it would be great if you could download a copy of the code and resources of the website to manipulate it locally right? Thanks to a pretty useful script that uses Puppeteer, this can be easily done within just minutes (and seconds after its implementation). This is only uncomfortable when we talk about code highlighting, as you can't compare the syntax highlighting offered by the browser with the one offered by your favorite IDE like Visual Studio Code, Netbeans etc. The easiest way to do this is by reading the source code of a web page, using Ctrl + U in Chrome for example, reading the JavaScript files as well as long as they're not minified (in websites that sell templates for example). How many times, as frontend developers, we decided to implement a copy of some feature that a third party website has in our own website? I usually do this a lot, specially when there's no open source alternative for the feature and i don't want to write it from scratch because it would take a lot of time to end up with something decent.
