Last active
April 2, 2017 23:57
-
-
Save zettca/df84ff7704359231daa581138b3a6393 to your computer and use it in GitHub Desktop.
Lightshot Gallery img.src getter
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
// 1. Go to http://prntscr.com/gallery.html > load all images. Get images to imgCodes | |
var codes = [].slice.call(document.getElementsByClassName("gallery-item")).map((el) => el.getAttribute("data-id36")); | |
// 2. Go to prntscr-snatcher App. Use the app to get the imgurCodes | |
var imgurCodes = []; | |
for (var i=imgCodes.length-1; i>=0; i--){ | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function(){ | |
if (xhttp.readyState == 4 && xhttp.status == 200){ | |
if (xhttp.responseText){ | |
imgurCodes[i] = xhttp.responseText; | |
} | |
} | |
}; | |
xhttp.open("GET", "imgCode/" + imgCodes[i], true); | |
xhttp.send(); | |
} | |
// 3. wget the links. voila |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment