From 360580ea6ea6fbdd7fbc0aa038d96b17de17e4f4 Mon Sep 17 00:00:00 2001 From: Luan Date: Sat, 9 Nov 2024 16:20:55 -0300 Subject: [PATCH] fix(ExpandableVideoDescriptionBody): Parse attributed description --- src/parser/classes/ExpandableVideoDescriptionBody.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/parser/classes/ExpandableVideoDescriptionBody.ts b/src/parser/classes/ExpandableVideoDescriptionBody.ts index aef441ea..a4570a8e 100644 --- a/src/parser/classes/ExpandableVideoDescriptionBody.ts +++ b/src/parser/classes/ExpandableVideoDescriptionBody.ts @@ -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); } } }