From e8ea4bcf676c557c1d21d35a776addbeac1570d1 Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 20 Nov 2023 14:20:38 +0000 Subject: [PATCH] add ggpht --- src/libpoketube/init/pages-api.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libpoketube/init/pages-api.js b/src/libpoketube/init/pages-api.js index 9b3ecf6f..8f576cd4 100644 --- a/src/libpoketube/init/pages-api.js +++ b/src/libpoketube/init/pages-api.js @@ -72,6 +72,17 @@ app.get("/avatars/:v", async function (req, 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) { var url = `https://invid-api.poketube.fun/ggpht/ytc/${req.params.v.replace("ytc", "")}`;