mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 00:37:49 +01:00
add @youtube.com url support
This commit is contained in:
parent
3676195537
commit
8229cc46b6
1 changed files with 7 additions and 2 deletions
|
@ -257,8 +257,13 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
app.get("/channel/", async (req, res) => {
|
app.get("/channel/", async (req, res) => {
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
try {
|
try {
|
||||||
const ID = req.query.id;
|
|
||||||
const tab = req.query.tab;
|
var ID = req.query.id;
|
||||||
|
|
||||||
|
if (ID.endsWith('@youtube.com')) {
|
||||||
|
ID = ID.slice(0, -'@youtube.com'.length);
|
||||||
|
}
|
||||||
|
const tab = req.query.tab;
|
||||||
const cache = {};
|
const cache = {};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue