//Uses PhantomJS to get the Key for MakeMKV
var wp = require("webpage");
var fs = require("fs");
var page = wp.create();
//error codes
var ERR = {
SUCCESS: 0,
FAILED_TO_LOAD_PAGE: 1
};
page.open("https://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053", function (status) {
if (status !== "success") {
phantom.exit(ERR.FAILED_TO_LOAD_PAGE);
} else {
var key = page.evaluate(function () {
return (document.querySelector(".codecontent") || {}).textContent;
});
console.log(key);
if(key){
fs.write("makemkv-key.txt", key, "w");
}
phantom.exit(ERR.SUCCESS);
}
});
Comments
0 B
|👍
/👎