refactor: clean up parser and tests (#387)

* tests: improve coverage

* refactor: clean up nodes

* chore: lint

* feat(parser): ignore `BrandVideoShelf`

Seems to be used for ads.

* feat(parser): ignore `BrandVideoSingleton` too
This commit is contained in:
LuanRT
2023-04-23 06:37:33 -03:00
committed by GitHub
parent f66f0bd656
commit 257bd475a0
358 changed files with 2823 additions and 3126 deletions

View File

@@ -1,18 +1,16 @@
import Parser from '../index.js';
import { YTNode } from '../helpers.js';
import Parser, { type RawNode } from '../index.js';
import Button from './Button.js';
class LiveChatItemList extends YTNode {
export default class LiveChatItemList extends YTNode {
static type = 'LiveChatItemList';
max_items_to_display: string;
more_comments_below_button: Button | null;
constructor(data: any) {
constructor(data: RawNode) {
super();
this.max_items_to_display = data.maxItemsToDisplay;
this.more_comments_below_button = Parser.parseItem(data.moreCommentsBelowButton, Button);
}
}
export default LiveChatItemList;
}