Standardize the titles and descriptions for the YouTube RSS feeds.
This commit is contained in:
@@ -13,9 +13,9 @@ module.exports = async (ctx) => {
|
||||
const data = (await utils.getPlaylistItems(playlistId, 'snippet,contentDetails')).data.items;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${data[0].snippet.channelTitle} 的 YouTube 视频`,
|
||||
title: `${data[0].snippet.channelTitle} - YouTube`,
|
||||
link: `https://www.youtube.com/channel/${id}`,
|
||||
description: `${data[0].snippet.channelTitle} 的 YouTube 视频`,
|
||||
description: `YouTube channel ${data[0].snippet.channelTitle}`,
|
||||
item: data
|
||||
.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')
|
||||
.map((item) => {
|
||||
|
||||
@@ -15,9 +15,9 @@ module.exports = async (ctx) => {
|
||||
const authors = (await utils.getVideoAuthor(ids, 'snippet')).data.items;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `Playlist: ${playlistTitle} by ${data[0].snippet.channelTitle}`,
|
||||
title: `${playlistTitle} by ${data[0].snippet.channelTitle} - YouTube`,
|
||||
link: `https://www.youtube.com/playlist?list=${id}`,
|
||||
description: `Playlist: ${playlistTitle} by ${data[0].snippet.channelTitle}`,
|
||||
description: `YouTube playlist ${playlistTitle} by ${data[0].snippet.channelTitle}`,
|
||||
item: data.map((item, index) => {
|
||||
const snippet = item.snippet;
|
||||
const videoId = snippet.resourceId.videoId;
|
||||
|
||||
@@ -13,9 +13,9 @@ module.exports = async (ctx) => {
|
||||
const data = (await utils.getPlaylistItems(playlistId, 'snippet,contentDetails')).data.items;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${username} 的 YouTube 视频`,
|
||||
title: `${username} - YouTube`,
|
||||
link: `https://www.youtube.com/user/${username}`,
|
||||
description: `${username} 的 YouTube 视频`,
|
||||
description: `YouTube user ${username}`,
|
||||
item: data
|
||||
.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')
|
||||
.map((item) => {
|
||||
|
||||
Reference in New Issue
Block a user