feat: expose parser and YTNodes as public APIs

This commit is contained in:
LuanRT
2022-09-04 05:17:24 -03:00
parent 982a086760
commit 3dc357bee0
6 changed files with 24 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import Parser from 'youtubei.js/dist/src/parser';
import { Parser } from 'youtubei.js';
import SectionList from 'youtubei.js/dist/src/parser/classes/SectionList';
import SingleColumnBrowseResults from 'youtubei.js/dist/src/parser/classes/SingleColumnBrowseResults';
@@ -32,6 +32,6 @@ if (!tab)
if (!tab.content)
throw new Error('Target tab appears to be empty');
const sections = tab.content?.as(SectionList).contents.array().as(MusicCarouselShelf, MusicShelf);
const sections = tab.content?.as(SectionList).contents.array().as(MusicCarouselShelf, MusicDescriptionShelf, MusicShelf);
console.info('Sections:', sections);