Skip to content

Commit

Permalink
fix(ExpandableVideoDescriptionBody): Parse attributed description
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Nov 9, 2024
1 parent b83a32f commit 360580e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/parser/classes/ExpandableVideoDescriptionBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ export default class ExpandableVideoDescriptionBody extends YTNode {

show_more_text: Text;
show_less_text: Text;
attributed_description_body_text?: string;
attributed_description_body_text?: Text;

constructor(data: RawNode) {
super();
this.show_more_text = new Text(data.showMoreText);
this.show_less_text = new Text(data.showLessText);

if (Reflect.has(data, 'attributedDescriptionBodyText')) {
this.attributed_description_body_text = data.attributedDescriptionBodyText?.content;
this.attributed_description_body_text = Text.fromAttributed(data.attributedDescriptionBodyText);
}
}
}

0 comments on commit 360580e

Please sign in to comment.