Created
January 31, 2021 21:05
-
-
Save 0xMilly/91dddade5ec6bda4f96395b9472cccfc to your computer and use it in GitHub Desktop.
Quick method to scrape Virgil Abloh's published files on public---domain.com - You can then import those URLs into some other software and download the whole collection. It should be around 15GB.
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
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
function downloadLinks() { | |
var a = document.createElement('a'); | |
var file = new Blob([ links.toString() ], { type: 'text/plain' }); | |
a.href = URL.createObjectURL(file); | |
a.download = 'virgil_abloh_links'; | |
a.click(); | |
} | |
var links = []; | |
async function getItems() { | |
for(let i = 0; i < 17; i++){ | |
document.getElementById("sidebar-item-"+i).click(); //change item | |
files = document.getElementsByClassName("file-list-item"); | |
for(let i = 0; i < files.length; i++){ | |
files[i].click(); | |
await sleep(250); | |
a = document.getElementsByClassName("file-name")[0].getElementsByTagName("a")[0].href; | |
console.log("Got a link: " + a); | |
links.push(a); | |
} | |
} | |
} | |
getItems(); | |
downloadLinks(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment