rsshub
Version:
Make RSS Great Again!
51 lines (49 loc) • 1.47 kB
JavaScript
import "./dist-Bog6z_OM.mjs";
import "./config-MQ-7ebJ_.mjs";
import { t as ViewType } from "./types-gOySfSXJ.mjs";
import "./logger-C4avouvV.mjs";
import "./ofetch-DKl_Ma9g.mjs";
import "./parse-date-r5WDWHno.mjs";
import "./is-worker-DESPicPc.mjs";
import "./cache-SV6W5EPy.mjs";
import { a as callApi, n as getDataByPlaylistId } from "./google-CvcgN7WE.mjs";
import { n as getDataByPlaylistId$1 } from "./youtubei-DqP__aN-.mjs";
//#region lib/routes/youtube/playlist.ts
const route = {
path: "/playlist/:id/:embed?",
categories: ["social-media"],
view: ViewType.Videos,
example: "/youtube/playlist/PLqQ1RwlxOgeLTJ1f3fNMSwhjVgaWKo_9Z",
parameters: {
id: "YouTube playlist id",
embed: "Default to embed the video, set to any value to disable embedding"
},
features: {
requireConfig: [{
name: "YOUTUBE_KEY",
description: " YouTube API Key, support multiple keys, split them with `,`, [API Key application](https://console.developers.google.com/)",
optional: true
}],
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
name: "Playlist",
maintainers: ["HenryQW"],
handler
};
async function handler(ctx) {
return await callApi({
googleApi: getDataByPlaylistId,
youtubeiApi: getDataByPlaylistId$1,
params: {
playlistId: ctx.req.param("id"),
embed: !ctx.req.param("embed"),
isJsonFeed: ctx.req.query("format") === "json"
}
});
}
//#endregion
export { route };