mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-04 03:51:00 +00:00
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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user