Skip to content
0

katanakit-js / useParseYoutubeRss

Function: useParseYoutubeRss() ​

ts
function useParseYoutubeRss(xml): {
  channelTitle?: string;
  description: string;
  durationSeconds?: number;
  embedUrl: string;
  id: string;
  publishedAt: string;
  thumbnail: string;
  thumbnails: {
     default: string;
     high: string;
     medium: string;
  };
  title: string;
  url: string;
  viewCount?: number;
}[];

Defined in: src/core/services/youtube.service.ts:394

Parses a YouTube channel RSS feed (feeds/videos.xml) into normalized videos. Pure and SSR-safe — no network, no DOM parser.

Parameters ​

ParameterTypeDescription
xmlstringRaw feed XML.

Returns ​

Normalized videos (newest first, as served by the feed).

Released under the MIT License.