Created
July 22, 2018 11:40
-
-
Save seeya/9f703dc26df5a5cdafd8d14f92b9ad38 to your computer and use it in GitHub Desktop.
Maplestage link extractor
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
// parallel download - https://github.com/fd0/machma | |
// dailymotion downloader - https://github.com/soimort/you-get | |
// Save the extracted links in a file | |
$("option").each(function() { | |
let base = "http://maplestage.com"; | |
let link = $(this).attr("value"); | |
$.get(`${base}${link}`,function(data) { | |
let title = $(data).find("option:selected").text().replace(" ", ""); | |
let id = data.split(`"name":"dailymotion","videos":[{"id":"`)[1].split(`"`)[0]; | |
console.log(`https://www.dailymotion.com/video/${id}#name=${title}`); | |
}) | |
}); | |
// Pipe it into a terminal | |
cat links.txt | machma -p 10 -- you-get {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment