AyrA icon

key.js

AyrA | PRO | 03/08/18 03:04:03 PM UTC | 0 ⭐ | 506 👁️ | Never ⏰ | []
JavaScript |

600 B

|

None

|

0 👍

/

0 👎

//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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎