1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 05:34:40 -05:00

add ggpht

This commit is contained in:
Ashley 2023-11-20 14:20:38 +00:00
parent ab4b168d44
commit e8ea4bcf67

View file

@ -72,6 +72,17 @@ app.get("/avatars/:v", async function (req, res) {
f.body.pipe(res); f.body.pipe(res);
}); });
app.get("/ggpht/:v", async function (req, res) {
var url = `https://invid-api.poketube.fun/ggpht/${req.params.v}`;
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
method: req.method,
});
f.body.pipe(res);
});
app.get("/avatars/ytc/:v", async function (req, res) { app.get("/avatars/ytc/:v", async function (req, res) {
var url = `https://invid-api.poketube.fun/ggpht/ytc/${req.params.v.replace("ytc", "")}`; var url = `https://invid-api.poketube.fun/ggpht/ytc/${req.params.v.replace("ytc", "")}`;