add @youtube.com url support

This commit is contained in:
Ashley 2024-01-04 15:51:08 +00:00
parent 3676195537
commit 8229cc46b6

View file

@ -257,7 +257,12 @@ module.exports = function (app, config, renderTemplate) {
app.get("/channel/", async (req, res) => {
const { fetch } = await import("undici");
try {
const ID = req.query.id;
var ID = req.query.id;
if (ID.endsWith('@youtube.com')) {
ID = ID.slice(0, -'@youtube.com'.length);
}
const tab = req.query.tab;
const cache = {};