add get thubnail

This commit is contained in:
Ashley 2023-11-07 14:55:10 +00:00
parent 9875899826
commit 87b98e0ad2

View file

@ -38,6 +38,17 @@ module.exports = function (app, config, renderTemplate) {
res.send("Disabled until further notice");
});
app.get("/vi/:v/:t", async function (req, res) {
var url = `https://i.ytimg.com/vi/${req.params.v}/${req.params.t}`
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
method: req.method,
});
f.body.pipe(res);
});
app.get("/api/search", async (req, res) => {
const query = req.query.query;