mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-13 00:38:10 +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 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) => {
|
||||
|
|
Loading…
Reference in a new issue