const app = require("express")();
const PORT = 8069;
-async function main(url, _callback) {
+async function main(domain, _callback) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
let data;
try {
- await page.goto("https://"+url+"/about/more", {waitUntil: "networkidle2"});
+ await page.goto("https://"+domain+"/about/more", {waitUntil: "networkidle2"});
data = await page.evaluate(() => {
let reject = []; // Suspended servers
let media_removal = []; // Filtered media
app.get("/", (req, res) => {
res.status(400).send({"message":"insert a domain"});
});
-app.get("/:url", (req, res) => {
- const {url} = req.params;
- main(url, data => res.status(200).send({
+app.get("/:domain", (req, res) => {
+ const {domain} = req.params;
+ main(domain, data => res.status(200).send({
"reject": data.reject,
"media_removal": data.media_removal,
"federated_timeline_removal": data.federated_timeline_removal,