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

add rss feed!! :3

This commit is contained in:
Ashley 2023-01-01 10:00:04 +00:00
parent 760cdf8c94
commit 72432c4e17

View file

@ -20,12 +20,12 @@ const {
const pkg = require("../../../package.json"); const pkg = require("../../../package.json");
const ver = "v22.1230-cMrvBa-stable-git" const ver = "v23.0101-cMrvBa-stable-git";
const versionnumber = "109" const versionnumber = "110";
const response = { const response = {
pt_version: ver, pt_version: ver,
vernum:versionnumber, vernum: versionnumber,
packages: { packages: {
libpt: version, libpt: version,
node: process.version, node: process.version,
@ -104,7 +104,7 @@ module.exports = function (app, config, renderTemplate) {
const id = req.query.v; const id = req.query.v;
const l = req.query.h; const l = req.query.h;
const url = `https://tube-srv.ashley143.gay/proxy/caption/${id}/${l}/`; let url = `https://tube-srv.ashley143.gay/proxy/caption/${id}/${l}/`;
let f = await modules.fetch(url); let f = await modules.fetch(url);
const body = await f.text(); const body = await f.text();
@ -112,6 +112,18 @@ module.exports = function (app, config, renderTemplate) {
res.send(body); res.send(body);
}); });
app.get("/feeds/videos.xml", async (req, res) => {
const id = req.query.channel_id;
let url = `https://youtube.com/feeds/videos.xml?channel_id=${id}`;
let f = await modules.fetch(url, {
method: req.method,
});
f.body.pipe(res);
});
app.get("/api/redirect", async (req, res) => { app.get("/api/redirect", async (req, res) => {
const red_url = req.query.u; const red_url = req.query.u;
@ -135,7 +147,6 @@ module.exports = function (app, config, renderTemplate) {
.then((json) => JSON.parse(json)); .then((json) => JSON.parse(json));
res.json(f); res.json(f);
}); });
}; };