Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ChairGraveyard/c469ba0e8022b859740cfa9b5bf7ed23 to your computer and use it in GitHub Desktop.
Save ChairGraveyard/c469ba0e8022b859740cfa9b5bf7ed23 to your computer and use it in GitHub Desktop.
Downloads all the free Mixamo Animations

Step 1

Go to https://www.mixamo.com/store/#/search?page=1, make sure you're logged in.

Step 2

open up chrome console by pressing F12 on your keyboard on the Mixamo webpage. Click on the "Console" tab in the new window (developer console).

Step 3

Paste in "DownloadMixamoByLouisHong.js" into the console input and return. It'll starting downloading from that page and until the last page.

// Anonymous "self-invoking" function
alert("Thank you for using this script created by Louis Hong (/u/loolo78)\n\nThe download will now begin.");
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = 'https://code.jquery.com/jquery-latest.min.js';
script.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(script);
// Poll for jQuery to come into existance
var checkReady = function(callback) {
if (window.jQuery) {
callback(jQuery);
}
else {
window.setTimeout(function() {
checkReady(callback);
}, 20);
}
}
;
// Start polling...
checkReady(function($) {
$(function() {
console.log("JQuery loaded, start downloading")
start()
});
});
})();
// http://facebook.com/anders.tornblad
// anders.tornblad@gmail.com
//------
function fetchList() {
console.log("Fetch all the animation in this page, you can optimized this by setting to page to 96 per page on the upper right")
return $("#site > div > div > div > div.product-results > div.product-list.thumbnails-md")[0].childNodes
}
function nextPage() {
console.log("This page is done, loading next page.")
var lastButton = $("#site > div > div > div > div.product-results > div.pagination-holder > ul")[0].lastChild.firstChild
lastButton.click()
}
function start() {
list = fetchList()
var i = 0
var purchased = false
var newPage = false
var loadingDog = false
var downloadObserver = new MutationObserver(function(mutations) {
if ($(".spinner-dog").length != 0) {
console.log("Waiting for page to load")
loadingDog = true
return
}
if (newPage && loadingDog) {
list = fetchList()
if (list.length == 0) {
return
}
window.scrollTo(0,document.body.scrollHeight);
newPage = false
loadingDog = false
list[0].click()
}
var download = $("#site > div > div.product-preview-holder.col-sm-6.col-push-6 > div > div.editor.row.row-no-gutter > div.editor-sidebar.col-xs-4 > div.sidebar-header > button")[0]
if (i >= list.length) {
nextPage()
$("#site > div > div.product-preview-holder.col-sm-6.col-push-6 > div > div.product-nav > button")[0].click()
i = 0
purchased = false
newPage = true
return
}
if (download.childNodes[0].innerHTML === "Loading…") {
return
}
if (download.childNodes[0].data === "Adding...") {
return
}
if (download.childNodes[0].data === "View / Download") {
list[i++].click()
purchased = false
console.log("This animation has already been downloaded")
return
} else {
if (!purchased) {
console.log("Downloading new animation")
download.click()
purchased = true
}
}
}
)
downloadObserver.observe($("#site > div")[0], {
childList: true,
subtree: true,
attributes: true,
characterData: true
})
list[0].click()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment