Created
January 29, 2018 20:40
-
-
Save MrYakobo/e46406db294f4821d94e2263c49b579d 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 a = $("a>img").map((i,t)=>$(t).attr('data-src')); | |
var arr = []; | |
for(var i = 0; i < a.length; i++) | |
arr.push(a[i]); | |
var c = arr.map(t=>{ | |
var b = `-o ${/[^\/]+?\.png|[^\/]+?\.jpg/.exec(t)}` | |
if(b != null){ | |
return `${b.replace('/','')} "${t.replace(/scale-to-width-down.+$/,'')}"` | |
} | |
return '' | |
}).filter(t=>t!='').join(' '); | |
copy("curl " + c); //execute with curl in terminal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment