youtubei.js / YT / Channel
Class: Channel
Defined in: src/parser/youtube/Channel.ts:46
Extends
Constructors
Constructor
new Channel(
actions,data,already_parsed?):Channel
Defined in: src/parser/youtube/Channel.ts:54
Parameters
actions
data
already_parsed?
boolean = false
Returns
Channel
Overrides
Properties
current_tab?
optionalcurrent_tab:Tab|ExpandableTab
Defined in: src/parser/youtube/Channel.ts:50
header?
optionalheader:C4TabbedHeader|CarouselHeader|InteractiveTabbedHeader|PageHeader
Defined in: src/parser/youtube/Channel.ts:47
metadata
metadata:
object
Defined in: src/parser/youtube/Channel.ts:48
android_appindexing_link?
optionalandroid_appindexing_link:string
android_deep_link?
optionalandroid_deep_link:string
android_package?
optionalandroid_package:string
app_name?
optionalapp_name:string
available_countries?
optionalavailable_countries:string[]
avatar?
optionalavatar:Thumbnail[]
description?
optionaldescription:string
external_id?
optionalexternal_id:string
ios_app_arguments?
optionalios_app_arguments:string
ios_app_store_id?
optionalios_app_store_id:string
ios_appindexing_link?
optionalios_appindexing_link:string
is_family_safe?
optionalis_family_safe:boolean
is_unlisted?
optionalis_unlisted:boolean
keywords?
optionalkeywords:string[]
music_artist_name?
optionalmusic_artist_name:string
noindex?
optionalnoindex:string
og_type?
optionalog_type:string
rss_url?
optionalrss_url:string
schema_dot_org_type?
optionalschema_dot_org_type:string
site_name?
optionalsite_name:string
tags?
optionaltags:string[]
thumbnail?
optionalthumbnail:Thumbnail[]
title?
optionaltitle:string
twitter_card_type?
optionaltwitter_card_type:string
twitter_site_handle?
optionaltwitter_site_handle:string
type?
readonlyoptionaltype:string
url?
optionalurl:string
url_applinks_android?
optionalurl_applinks_android:string
url_applinks_ios?
optionalurl_applinks_ios:string
url_applinks_web?
optionalurl_applinks_web:string
url_canonical?
optionalurl_canonical:string
url_twitter_android?
optionalurl_twitter_android:string
url_twitter_ios?
optionalurl_twitter_ios:string
vanity_channel_url?
optionalvanity_channel_url:string
subscribe_button?
optionalsubscribe_button:SubscribeButton
Defined in: src/parser/youtube/Channel.ts:49
Accessors
actions
Get Signature
get actions():
Actions
Defined in: src/core/mixins/Feed.ts:181
Returns
Inherited from
channels
Get Signature
get channels():
ObservedArray<Channel|GridChannel>
Defined in: src/core/mixins/Feed.ts:127
Get all the channels in the feed
Returns
ObservedArray<Channel | GridChannel>
Inherited from
content_type_filters
Get Signature
get content_type_filters():
string[]
Defined in: src/parser/youtube/Channel.ts:274
Returns
string[]
filter_nodes
Get Signature
get filter_nodes():
FilterNodes
Defined in: src/parser/youtube/Channel.ts:199
Returns the InnerTube renderer nodes representing filters.
Returns
FilterNodes
filters
Get Signature
get filters():
string[]
Defined in: src/parser/youtube/Channel.ts:246
Returns the available primary filters as strings.
Returns
string[]
has_about
Get Signature
get has_about():
boolean
Defined in: src/parser/youtube/Channel.ts:412
Returns
boolean
has_community
Get Signature
get has_community():
boolean
Defined in: src/parser/youtube/Channel.ts:408
Returns
boolean
has_continuation
Get Signature
get has_continuation():
boolean
Defined in: src/core/mixins/Feed.ts:195
Checks if the feed has continuation.
Returns
boolean
Inherited from
has_courses
Get Signature
get has_courses():
boolean
Defined in: src/parser/youtube/Channel.ts:400
Returns
boolean
has_home
Get Signature
get has_home():
boolean
Defined in: src/parser/youtube/Channel.ts:376
Returns
boolean
has_live_streams
Get Signature
get has_live_streams():
boolean
Defined in: src/parser/youtube/Channel.ts:388
Returns
boolean
has_playlists
Get Signature
get has_playlists():
boolean
Defined in: src/parser/youtube/Channel.ts:404
Returns
boolean
has_podcasts
Get Signature
get has_podcasts():
boolean
Defined in: src/parser/youtube/Channel.ts:396
Returns
boolean
has_releases
Get Signature
get has_releases():
boolean
Defined in: src/parser/youtube/Channel.ts:392
Returns
boolean
has_search
Get Signature
get has_search():
boolean
Defined in: src/parser/youtube/Channel.ts:419
Returns
boolean
has_shorts
Get Signature
get has_shorts():
boolean
Defined in: src/parser/youtube/Channel.ts:384
Returns
boolean
has_videos
Get Signature
get has_videos():
boolean
Defined in: src/parser/youtube/Channel.ts:380
Returns
boolean
memo
Get Signature
get memo():
Memo
Defined in: src/core/mixins/Feed.ts:138
Returns
Inherited from
page
Get Signature
get page():
T
Defined in: src/core/mixins/Feed.ts:188
Get the original page data
Returns
T
Inherited from
page_contents
Get Signature
get page_contents():
SectionList|MusicQueue|RichGrid|ReloadContinuationItemsCommand
Defined in: src/core/mixins/Feed.ts:145
Returns contents from the page.
Returns
SectionList | MusicQueue | RichGrid | ReloadContinuationItemsCommand
Inherited from
playlists
Get Signature
get playlists():
ObservedArray<GridPlaylist|LockupView|Playlist>
Defined in: src/core/mixins/Feed.ts:134
Get all playlists in the feed
Returns
ObservedArray<GridPlaylist | LockupView | Playlist>
Inherited from
posts
Get Signature
get posts():
ObservedArray<BackstagePost|Post|SharedPost>
Defined in: src/core/mixins/Feed.ts:120
Get all the community posts in the feed
Returns
ObservedArray<BackstagePost | Post | SharedPost>
Inherited from
secondary_contents
Get Signature
get secondary_contents():
SectionList|BrowseFeedActions|ProfileColumn|SecondarySearchContainer|null
Defined in: src/core/mixins/Feed.ts:169
Returns secondary contents from the page.
Returns
SectionList | BrowseFeedActions | ProfileColumn | SecondarySearchContainer | null
Inherited from
secondary_filters
Get Signature
get secondary_filters():
string[]
Defined in: src/parser/youtube/Channel.ts:265
Returns the available secondary filters as strings.
NOTE: Not all channels have secondary filters!
Returns
string[]
shelves
Get Signature
get shelves():
ObservedArray<ReelShelf|RichShelf|Shelf>
Defined in: src/core/mixins/Feed.ts:155
Returns all segments/sections from the page.
Returns
ObservedArray<ReelShelf | RichShelf | Shelf>
Inherited from
sort_filters
Get Signature
get sort_filters():
string[]
Defined in: src/parser/youtube/Channel.ts:269
Returns
string[]
tabs
Get Signature
get tabs():
string[]
Defined in: src/core/mixins/TabbedFeed.ts:19
Returns
string[]
Inherited from
title
Get Signature
get title():
string|undefined
Defined in: src/core/mixins/TabbedFeed.ts:55
Returns
string | undefined
Inherited from
videos
Get Signature
get videos():
ObservedArray<CompactVideo|GridVideo|LockupView|PlaylistPanelVideo|PlaylistVideo|ReelItem|ShortsLockupView|Video|WatchCardCompactVideo>
Defined in: src/core/mixins/Feed.ts:113
Get all the videos in the feed
Returns
ObservedArray<CompactVideo | GridVideo | LockupView | PlaylistPanelVideo | PlaylistVideo | ReelItem | ShortsLockupView | Video | WatchCardCompactVideo>
Inherited from
Methods
applyContentTypeFilter()
applyContentTypeFilter(
content_type_filter):Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:177
Applies given content type filter to the list. Use content_type_filters to get available filters.
Parameters
content_type_filter
string
The content type filter to apply
Returns
Promise<Channel>
applyFilter()
applyFilter(
primaryFilter,secondaryFilter?):Promise<FilteredChannelList>
Defined in: src/parser/youtube/Channel.ts:101
Applies a filter to the channel list. filters, secondary_filters, and filter_nodes can be used to get available filters.
Parameters
primaryFilter
The primary filter to apply. Can be a string representing the filter name, a ChipView instance, or a ListItemView instance.
string | ListItemView | ChipView
secondaryFilter?
An optional secondary filter to apply after the primary filter. Can be a string representing the filter name or a ChipView instance.
string | ChipView
Returns
Promise<FilteredChannelList>
Example
// Apply a primary filter by name.
const filtered = await videos.applyFilter('Oldest');
// Apply a primary and secondary filter by name.
const filtered = await videos.applyFilter('Oldest', 'Members only');
// Since we're using `filtered`, the following will return the latest members-only videos,
// unless the secondary filter is explicitly changed.
const latestMembersOnly = await filtered.applyFilter('Latest');
applySort()
applySort(
sortFilter):Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:154
Applies a sort filter to the list. Use sort_filters to get available filters.
Parameters
sortFilter
string
The sort filter to apply
Returns
Promise<Channel>
getAbout()
getAbout():
Promise<ChannelAboutFullMetadata|AboutChannel>
Defined in: src/parser/youtube/Channel.ts:328
Retrieves the about page. Note that this does not return a new Channel object.
Returns
Promise<ChannelAboutFullMetadata | AboutChannel>
getCommunity()
getCommunity():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:319
Returns
Promise<Channel>
getContinuation()
getContinuation():
Promise<ChannelListContinuation>
Defined in: src/parser/youtube/Channel.ts:423
Retrieves next batch of contents and returns a new Feed object.
Returns
Promise<ChannelListContinuation>
Overrides
getContinuationData()
getContinuationData():
Promise<IBrowseResponse|undefined>
Defined in: src/core/mixins/Feed.ts:202
Retrieves continuation data as it is.
Returns
Promise<IBrowseResponse | undefined>
Inherited from
TabbedFeed.getContinuationData
getCourses()
getCourses():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:309
Returns
Promise<Channel>
getHome()
getHome():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:279
Returns
Promise<Channel>
getLiveStreams()
getLiveStreams():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:294
Returns
Promise<Channel>
getPlaylists()
getPlaylists():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:314
Returns
Promise<Channel>
getPodcasts()
getPodcasts():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:304
Returns
Promise<Channel>
getReleases()
getReleases():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:299
Returns
Promise<Channel>
getShelf()
Defined in: src/core/mixins/Feed.ts:162
Finds shelf by title.
Parameters
title
string
Returns
ReelShelf | RichShelf | Shelf | undefined
Inherited from
getShorts()
getShorts():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:289
Returns
Promise<Channel>
getTabByName()
getTabByName(
title):Promise<TabbedFeed<IBrowseResponse>>
Defined in: src/core/mixins/TabbedFeed.ts:23
Parameters
title
string
Returns
Promise<TabbedFeed<IBrowseResponse>>
Inherited from
getTabByURL()
getTabByURL(
url):Promise<TabbedFeed<IBrowseResponse>>
Defined in: src/core/mixins/TabbedFeed.ts:37
Parameters
url
string
Returns
Promise<TabbedFeed<IBrowseResponse>>
Inherited from
getVideos()
getVideos():
Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:284
Returns
Promise<Channel>
hasTabWithURL()
hasTabWithURL(
url):boolean
Defined in: src/core/mixins/TabbedFeed.ts:51
Parameters
url
string
Returns
boolean
Inherited from
search()
search(
query):Promise<Channel>
Defined in: src/parser/youtube/Channel.ts:365
Searches within the channel.
Parameters
query
string
Returns
Promise<Channel>
getPlaylistsFromMemo()
staticgetPlaylistsFromMemo(memo):ObservedArray<GridPlaylist|LockupView|Playlist>
Defined in: src/core/mixins/Feed.ts:95
Get all playlists on a given page via memo
Parameters
memo
Returns
ObservedArray<GridPlaylist | LockupView | Playlist>
Inherited from
TabbedFeed.getPlaylistsFromMemo
getVideosFromMemo()
staticgetVideosFromMemo(memo):ObservedArray<CompactVideo|GridVideo|LockupView|PlaylistPanelVideo|PlaylistVideo|ReelItem|ShortsLockupView|Video|WatchCardCompactVideo>
Defined in: src/core/mixins/Feed.ts:78
Get all videos on a given page via memo
Parameters
memo
Returns
ObservedArray<CompactVideo | GridVideo | LockupView | PlaylistPanelVideo | PlaylistVideo | ReelItem | ShortsLockupView | Video | WatchCardCompactVideo>