mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-25 17:28:37 +01:00
add get thubnail
This commit is contained in:
parent
9875899826
commit
87b98e0ad2
1 changed files with 11 additions and 0 deletions
|
@ -37,7 +37,18 @@ module.exports = function (app, config, renderTemplate) {
|
|||
app.get("/embed/:v", async function (req, res) {
|
||||
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