Files
RSSHub/lib/v2/vimeo/radar.js
MisteryMonster 0c7aaf8a5a feat(route): add vimeo with more (#7604)
* add vimeo with more

* refactor: migrate to v2

Co-authored-by: TonyRL <TonyRL@users.noreply.github.com>
2022-02-22 03:07:02 +08:00

34 lines
1.4 KiB
JavaScript

module.exports = {
'vimeo.com': {
_name: 'Vimeo',
'.': [
{
title: 'User videos',
docs: 'https://docs.rsshub.app/social-media.html#vimeo-yong-hu-ye-mian',
source: '/:username/',
target: (params, url, document) => {
const uid = document && document.querySelector('html').innerHTML.match(/app.vimeo.com\/users\/([0-9]+)/)[1];
return uid ? `/vimeo/user/${uid}` : '';
},
},
{
title: 'User Video Category',
docs: 'https://docs.rsshub.app/social-media.html#vimeo-yong-hu-ye-mian',
source: '/',
},
{
title: 'Channel',
docs: 'https://docs.rsshub.app/social-media.html#vimeo-channel',
source: ['/channels/:channel', '/channels/:channel/videos', '/channels/:channel/videos/:sort/:format'],
target: '/vimeo/channel/:channel',
},
{
title: 'Category',
docs: 'https://docs.rsshub.app/social-media.html#vimeo-category',
source: ['/categories/:category', '/categories/:category/:subcategory', '/categories/:category/:subcategory/videos'],
target: (params) => `/vimeo/category/:category${params.subcategory ? `/` + params.subcategory : ''}`,
},
],
},
};