Last active
December 27, 2016 14:43
-
-
Save stripedpurple/d0d8b6fd9c9610a447f110b76b7261ae to your computer and use it in GitHub Desktop.
Small bit of JS for funimation
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
// ==UserScript== | |
// @name FUNI FFMPEG | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://www.funimation.com/shows/*/videos/official/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
playersData[0].playlist.forEach(function (item) { | |
if (item.hasOwnProperty('items')){ | |
item.items.forEach(function (i) { | |
if (i.hasOwnProperty('videoType')){ | |
alert("ffmpeg -i " + i.videoSet[0].sdUrl + i.videoSet[0].authToken + " -c copy " + i.artist.split(" ").join("_") + "_S0E_" + i.title.split(" ").join("_") + ".mkv"); | |
alert("ffmpeg -i " + i.videoSet[0].hdUrl + i.videoSet[0].authToken + " -c copy " + i.artist.split(" ").join("_") + "_S0E_" + i.title.split(" ").join("_") + ".mkv"); | |
alert("ffmpeg -i " + i.videoSet[0].hd1080Url + i.videoSet[0].authToken + " -c copy " + i.artist.split(" ").join("_") + "_S0E_" + i.title.split(" ").join("_") + ".mkv"); | |
} | |
}); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment