Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save krazyjakee/1e3592856dd636b8043cc359ad9d66fc to your computer and use it in GitHub Desktop.
Save krazyjakee/1e3592856dd636b8043cc359ad9d66fc 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 "DownloadMixamoByJakeCattrall.js" into the console input and return. It'll starting downloading from that page and until the last page.

function trigger(el, eventType) {
if (typeof eventType === 'string' && typeof el[eventType] === 'function') {
el[eventType]();
} else {
const event =
eventType === 'string'
? new Event(eventType, {bubbles: true})
: eventType;
el.dispatchEvent(event);
}
}
function fetchList() {
return document.querySelectorAll(".product-results-holder .product-animation")
}
const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
const nextPage = async () => {
var lastButton = document.querySelectorAll(".pagination.pagination-sm li:last-child a")
trigger(lastButton[0], "click")
await wait(5000)
}
const start = async () => {
list = fetchList()
for (var i = 0; i <= list.length; i++) {
if (i >= list.length) {
await nextPage()
list = fetchList()
if (list.length == 0) {
return alert("Done!")
}
i = 0
window.scrollTo(0, document.body.scrollHeight);
}
trigger(list[i], "click")
await wait(5000)
var download = document.querySelectorAll(".product-preview-holder .editor.row.row-no-gutter > div.editor-sidebar.col-xs-4 button")[0]
trigger(download, "click")
await wait(800)
var download2 = document.querySelectorAll(".modal-footer .btn-primary")[0]
trigger(download2, "click")
await wait(8000)
console.log(`Completed item ${i} of ${list.length - 1}`)
}
}
start()
@kenorb
Copy link

kenorb commented Feb 7, 2023

Code to select options:

(() => { var select = document.querySelectorAll("select.input-sm.form-control")[4]; select.value = 2; select.dispatchEvent(new Event('change', {bubbles: true})); })();
(() => { var select = document.querySelectorAll("select.input-sm.form-control")[3]; select.value = 24; select.dispatchEvent(new Event('change', {bubbles: true})); })();

@shrinktofit
Copy link

Thank you author, for other ones who want instead the characters, simply modify:

 function fetchList() {
-    return document.querySelectorAll(".product-results-holder .product-animation")
+    return document.querySelectorAll(".product-results-holder .product-character")
 }

@DaveInchy
Copy link

DaveInchy commented Sep 27, 2023

function trigger(el, eventType) {
  if (typeof eventType === 'string' && typeof el[eventType] === 'function') {
    el[eventType]();
  } else {
    const event =
      eventType === 'string'
        ? new Event(eventType, {bubbles: true})
        : eventType;
    el.dispatchEvent(event);
  }
}

function fetchList() {
    if (window.location.href.includes(`Character`)) {
        return document.querySelectorAll(".product-results-holder .product-character")

    } else {
        return document.querySelectorAll(".product-results-holder .product-animation")

    }
}

const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));

const nextPage = async () => {
  var lastButton = document.querySelectorAll(".pagination.pagination-sm li:last-child a")
  trigger(lastButton[0], "click")
  await wait(5000)
}

const start = async () => {
    var list = fetchList();

    for (var i = 0; i <= list.length; i++) {
      if (i >= list.length) {
        await nextPage()
        list = fetchList()
        if (list.length == 0) {
          return alert("Done!")
        }
        i = 0
        window.scrollTo(0, document.body.scrollHeight);
      }

      trigger(list[i], "click")
      await wait(5000)

      var inplace = document.querySelectorAll(`#site > div:nth-child(5) > div > div > div.product-preview-holder.col-sm-6 > div > div.editor.row.row-no-gutter > div.editor-sidebar.col-xs-4 > div.sidebar-list > div > div > div.animation-settings-list > div > label > input[name="inplace"]`)[0]
      if (inplace) {
          trigger(inplace, "click")
          await wait(800)
      }

      var download = document.querySelectorAll(".product-preview-holder .editor.row.row-no-gutter > div.editor-sidebar.col-xs-4 button")[0]
      if (download) {
        trigger(download, "click")
        await wait(1000)
      }

      (() => { var select = document.querySelectorAll("select.input-sm.form-control")[4]; select.value = 2; select.dispatchEvent(new Event('change', { bubbles: true })); })();
      (() => { var select = document.querySelectorAll("select.input-sm.form-control")[3]; select.value = 24; select.dispatchEvent(new Event('change', { bubbles: true })); })();

      var download2 = document.querySelectorAll(".modal-footer .btn-primary")[0]
      trigger(download2, "click")
      await wait(8000)

      console.log(`Completed item ${i} of ${list.length - 1}`)
    }
}

start()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment