Skip to content

Instantly share code, notes, and snippets.

@noahkw
Created August 28, 2020 20:56
Show Gist options
  • Select an option

  • Save noahkw/efdf8ca3b972130e25820925c41a95d6 to your computer and use it in GitHub Desktop.

Select an option

Save noahkw/efdf8ca3b972130e25820925c41a95d6 to your computer and use it in GitHub Desktop.
Copy paste this into your browser's console and it should spit out a file containing links to all the pictures in the blog post.
function naverUrls() {
let elements = document.getElementsByClassName("__se_link");
let out = '';
for (let e in elements) {
let cur = elements[e];
if (cur.dataset) {
data = cur.dataset['linkdata'];
parsed = JSON.parse(data);
out += parsed.src + '\n';
}
}
download("naver_links.txt", out);
}
function download(filename, text) {
let element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
naverUrls()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment