Created
February 9, 2021 03:07
-
-
Save smopro/d7e7c2fbdd336f37c8c9f0e429f8e131 to your computer and use it in GitHub Desktop.
Seasonvar parser
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
1. Открывает Dev Tools (F12 в большинстве браузеров). | |
2. Выбираем Network и начинаем записывать все запросы. | |
3. Находим нужную страницу с нужным сериалом и сезоном. | |
4. Открываем её, дожидаемся загрузки плеера. | |
5. Во вкладке Network ищем запрос: XXXXXXXX/list.xml?rand=XXXXXXX | |
6. ПКМ -> Copy URL | |
7. Открываем ссылку в новой вкладке, сохраняем файл. | |
8. Запускаем парсер: `node parser.js ПутьКСкачанномуФайлу` | |
9. После завершение работы парсера, рядом с скачанным файлом будет находиться файл с расширением .dwnl | |
10. Данный файл содержит прямые ссылки на медиафайлы с сериями. | |
11. Выкачиваем все серии через wget: `wget -i XXX.dwnl` | |
12. Профит |
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
var fs = require('fs'); | |
var sys = require('sys'); | |
var exec = require('child_process').exec; | |
var child; | |
if(typeof(process.argv[2]) === "undefined") { console.warn("List file undefined"); process.exit(0); } | |
fs.readFile(process.argv[2], "utf-8", function (err, data){ | |
if(err) { throw err; } | |
data = data.replace(/(\r\n|\n|\r)/gm,""); | |
data = JSON.parse(data); | |
downloadList = []; | |
for(var x = 0; x < data.playlist.length; x++) { | |
downloadList[x] = data.playlist[x].file; | |
} | |
if(downloadList.length == data.playlist.length) { | |
fileStream = fs.createWriteStream(process.argv[2] + ".dwnl"); | |
fileStream.once('open', function () { | |
for(var x = 0; x < downloadList.length; x++) { | |
fileStream.write(downloadList[x] + '\n'); | |
} | |
fileStream.end(); | |
console.log("Successfull"); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment