Files
npease 55ee328bd6
Update Server / Primary Server Repo Update (push) Successful in 4m47s
Update Server / Physical Server Update Trigger (push) Successful in 4s
Add deemix-docker-script.js
2024-01-05 16:23:35 -10:00

31 lines
784 B
JavaScript

const rp = require("request-promise");
const cheerio = require("cheerio");
const { exec } = require("child_process");
const fs = require("fs");
const url = "https://rentry.org/firehawk52#deezer";
exec("rm ../config/login.json", (error, stdout, stderr) => {});
rp(url).then(function (html) {
const $ = cheerio.load(html);
arl = null;
$("table.ntable:nth-of-type(1) > tbody")
.find("tr")
.each(function () {
if ($("td", this).html().includes("Canada")) {
arl = $("td:nth-child(4) > code", this).text();
}
});
outputJson = {
"accessToken": null,
'arl': arl,
}
fs.writeFile("../config/login.json", JSON.stringify(outputJson), (err) => {
if (err) {
console.error(err);
}
});
});