add get thubnail

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

View file

@ -37,7 +37,18 @@ module.exports = function (app, config, renderTemplate) {
app.get("/embed/:v", async function (req, res) { app.get("/embed/:v", async function (req, res) {
res.send("Disabled until further notice"); 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) => { app.get("/api/search", async (req, res) => {
const query = req.query.query; const query = req.query.query;