resource-downloader
v0.5.3
Published
resource downloader, scrap web site resources
Downloads
6
Readme
web-resource-downlaoder
install
npm -g i resource-downloader
rdcli #or resource-downloader
feature
- command line interface
- local config, multiple remote configs
- download multiple image resource -> zip
- wide(width > height) images -> split half / half
- swap split file order(split: left -> right, splitRight right -> left)
- async operation(via stream);
config
rdconfig.json
sample
{
"sites": [{
"name": "Top Box Office (US)",
"url": "http://www.imdb.com/chart/boxoffice",
"stages": [{
"type": "list",
"selector": "#boxoffice .titleColumn a",
"attrs": {
"value": "href"
},
"message": "select movie",
"operation": {
"type": "next"
}
}, {
"type": "download",
"selector": ".poster img",
"attrs": {
"value": "src"
},
"prefixes": {
"doing": "[receiving] ",
"done": "[received] ${0}"
},
"operation": {
"type": "prev"
}
}]
}],
"remoteConfigs": []
}
typescript definition
interface Config {
sites: Sites;
remoteConfigs: string[];
}
remoteConfigs is url indicates rdconfig.json
format text
loading order
- ./rdconfig.json
- ~/.config/rdconfig.json
etc
license
Apache 2.0