Created
February 28, 2018 17:07
-
-
Save epk/1a45caee81f80c3508f9cf31579345a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var host="somehost"; | |
var request = require('request'); | |
var myMap = new Map(); | |
for(var i = 2 ; i<process.argv.length; i++){ | |
let orig = process.argv[i]; | |
//console.log(orig); | |
let r = request.get(host+process.argv[i], function (err, res, body) { | |
//console.log(r.uri.href); | |
rs = r.uri.href.split("/"); | |
rs1 = "../../images/" + rs[rs.length-1]; | |
myMap.set(orig,rs1); | |
console.log(myMap); | |
}); | |
} | |
console.log("Done"); | |
console.log(myMap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment