assets-vault
v1.0.10
Published
Download all assets from any webpage including images, styles, scripts, and more
Maintainers
Readme
Website Asset Downloader
A powerful Node.js package to download all assets from any webpage, including images, styles, scripts, fonts, and more.
Installation
npm install assets-vaultUsage
import { WebsiteAssetDownloader } from 'assets-vault';
// Basic usage
const downloader = new WebsiteAssetDownloader('https://example.com', {
outputFolder: 'my-downloads'
});
await downloader.downloadAll();
// Advanced usage with options
const downloader = new WebsiteAssetDownloader('https://example.com', {
outputFolder: 'my-downloads',
maxPages: 50,
delay: 2000,
includeSubdomains: true,
customCategories: {
pdfs: /\.pdf(\?.*)?$/i,
images2x: /@2x\.(jpg|png)(\?.*)?$/i
}
});
const stats = await downloader.downloadAll();
console.log('Statistics:', stats);Options
outputFolder(required): Directory where assets will be savedmaxPages(optional): Maximum number of pages to crawl (default: 50)delay(optional): Delay between requests in milliseconds (default: 1000)includeSubdomains(optional): Whether to include subdomains (default: false)customCategories(optional): Custom asset categories with regex patterns
License
MIT
