add try catch :p

This commit is contained in:
Ashley 2023-08-05 20:44:49 +00:00
parent 5d12d4bc06
commit 05b8dfff18

View file

@ -67,12 +67,18 @@ module.exports = function (app, config, renderTemplate) {
const id = req.query.v;
const l = req.query.h;
try {
let url = `https://invid-api.poketube.fun/api/v1/captions/${id}?label=${l}`;
let f = await modules.fetch(url);
const body = await f.text();
res.send(body);
} catch {
}
});
app.get("/feeds/videos.xml", async (req, res) => {