Skip to main content
Module

x/youtubei/deno.ts>Parser.parse

A wrapper around YouTube's internal API — reverse engineering InnerTube
Very Popular
Go to Latest
function Parser.parse
import { Parser } from "https://deno.land/x/youtubei@v9.3.0-deno/deno.ts";
const { parse } = Parser;

Parses an item or an array of items.

Type Parameters

T extends YTNode
K extends YTNodeConstructor<T>[]

Parameters

data: RawData
  • The data to parse.
requireArray: true
  • Whether the data should be parsed as an array.
optional
validTypes: K
  • YTNode types that are allowed to be parsed.

Returns

ObservedArray<InstanceType<K[number]>> | null

Type Parameters

T extends YTNode
K extends YTNodeConstructor<T>

Parameters

data: RawData
requireArray: true
optional
validTypes: K

Returns

ObservedArray<InstanceType<K>> | null

Type Parameters

optional
T extends YTNode = YTNode

Parameters

optional
data: RawData
optional
requireArray: false | undefined
optional
validTypes: YTNodeConstructor<T> | YTNodeConstructor<T>[]