mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 08:58:13 +01:00
add get thubnail
This commit is contained in:
parent
9875899826
commit
87b98e0ad2
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue