Files
RSSHub/lib/v2/youtube/radar.js
T
Tony f1d696ed21 feat(route): youtube custom channel url (#11085)
* feat(route): youtube custom url

* docs: fix typo
2022-10-14 00:45:22 +04:00

38 lines
1.3 KiB
JavaScript

module.exports = {
'youtube.com': {
_name: 'YouTube',
www: [
{
title: '用户',
docs: 'https://docs.rsshub.app/social-media.html#youtube',
source: '/user/:username',
target: '/youtube/user/:username',
},
{
title: '频道',
docs: 'https://docs.rsshub.app/social-media.html#youtube',
source: '/channel/:id',
target: '/youtube/channel/:id',
},
{
title: '自定义网址',
docs: 'https://docs.rsshub.app/social-media.html#youtube',
source: '/c/:id',
target: '/youtube/c/:id',
},
{
title: '播放列表',
docs: 'https://docs.rsshub.app/social-media.html#youtube',
source: '/playlist',
target: (params, url) => `/youtube/playlist/${new URL(url).searchParams.get('list')}`,
},
{
title: '订阅列表',
docs: 'https://docs.rsshub.app/social-media.html#youtube',
source: ['/feed/subscriptions', '/feed/channels'],
target: '/youtube/subscriptions',
},
],
},
};