webpage-resource-downloader
v1.0.5
Published
使用 `npm install webpage-resource-downloader` 安装.
Downloads
9
Readme
Web页面资源下载
使用 npm install webpage-resource-downloader
安装.
import { getUrls, downloadResources } from "webpage-resource-downloader"
getUrls("https://hot.cnbeta.com/articles/movie/953697.htm")
.then(resources => resources.filter(res => res.type === "img").map(res => res.url))
.then(urls => downloadResources(urls, "out", true))