mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-02 02:07:29 +01:00
add try catch :p
This commit is contained in:
parent
5d12d4bc06
commit
05b8dfff18
1 changed files with 6 additions and 0 deletions
|
@ -67,12 +67,18 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
const id = req.query.v;
|
const id = req.query.v;
|
||||||
const l = req.query.h;
|
const l = req.query.h;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
let url = `https://invid-api.poketube.fun/api/v1/captions/${id}?label=${l}`;
|
let url = `https://invid-api.poketube.fun/api/v1/captions/${id}?label=${l}`;
|
||||||
|
|
||||||
let f = await modules.fetch(url);
|
let f = await modules.fetch(url);
|
||||||
const body = await f.text();
|
const body = await f.text();
|
||||||
|
|
||||||
res.send(body);
|
res.send(body);
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/feeds/videos.xml", async (req, res) => {
|
app.get("/feeds/videos.xml", async (req, res) => {
|
||||||
|
|
Loading…
Reference in a new issue