Skip to main content
Module

x/youtube_sr/Util.ts>default

Simple library for Node, Deno & Bun to make YouTube search easily
Go to Latest
class default
import { default } from "https://deno.land/x/youtube_sr@v4.3.1/Util.ts";

Constructors

new
private
default()

Static Properties

readonly
AlbumRegex: RegExp
readonly
PlaylistIDRegex: RegExp

YouTube Playlist ID regex

readonly
PlaylistURLRegex: RegExp

YouTube playlist URL Regex

readonly
VideoIDRegex: RegExp
readonly
VideoRegex: RegExp

Static Methods

durationString(data: any): string
filter(ftype: string): string
getContinuationToken(ctx: any): string
getHTML(url: string, requestOptions?: RequestInit): Promise<string>

Parse HTML

getInfoLikesCount(info: Record<string, any>)
getNext(body: any, home?): Video[]
getPlaylist(html: string, limit?: number): Playlist
getPlaylistURL(url: string): string
getPlaylistVideos(data: any, limit?: number)
getVideo(html: string)
innertubeKey(): Promise<string>
json(data: string)
makeRequest(url?, data?: any)
parseChannel(data?: any): Channel

Parse channel from raw data

parseDuration(duration: string): number

Returns duration in ms

parseHomepage(html: string): Video[]
parseMS(milliseconds: number)
parsePlaylist(data?: any): Playlist
parseSearchResult(html: string, options?: ParseSearchInterface): (Video | Channel | Playlist)[]

Parse items from html

parseVideo(data?: any): Video

Parse video from raw data

validatePlaylist(url: string): void