mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 00:02:09 +00:00
feat(Parser): Add HowThisWasMadeSectionView node
This commit is contained in:
18
src/parser/classes/HowThisWasMadeSectionView.ts
Normal file
18
src/parser/classes/HowThisWasMadeSectionView.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { type RawNode } from '../index.js';
|
||||
import { YTNode } from '../helpers.js';
|
||||
import Text from "./misc/Text.js";
|
||||
|
||||
export default class HowThisWasMadeSectionView extends YTNode {
|
||||
static type = 'HowThisWasMadeSectionView';
|
||||
|
||||
public section_title: Text;
|
||||
public body_text: Text;
|
||||
public body_header: Text;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.section_title = Text.fromAttributed(data.sectionText);
|
||||
this.body_text = Text.fromAttributed(data.bodyText);
|
||||
this.body_header = Text.fromAttributed(data.bodyHeader);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { YTNode, type ObservedArray } from '../helpers.js';
|
||||
import { type ObservedArray, YTNode } from '../helpers.js';
|
||||
import { Parser, type RawNode } from '../index.js';
|
||||
import ExpandableVideoDescriptionBody from './ExpandableVideoDescriptionBody.js';
|
||||
import HorizontalCardList from './HorizontalCardList.js';
|
||||
@@ -7,16 +7,18 @@ import VideoDescriptionInfocardsSection from './VideoDescriptionInfocardsSection
|
||||
import VideoDescriptionMusicSection from './VideoDescriptionMusicSection.js';
|
||||
import VideoDescriptionTranscriptSection from './VideoDescriptionTranscriptSection.js';
|
||||
import VideoDescriptionCourseSection from './VideoDescriptionCourseSection.js';
|
||||
import ReelShelf from './ReelShelf.js';
|
||||
import VideoAttributesSectionView from './VideoAttributesSectionView.js';
|
||||
import HowThisWasMadeSectionView from "./HowThisWasMadeSectionView.js";
|
||||
import ReelShelf from './ReelShelf.js';
|
||||
|
||||
export default class StructuredDescriptionContent extends YTNode {
|
||||
static type = 'StructuredDescriptionContent';
|
||||
|
||||
items: ObservedArray<
|
||||
public items: ObservedArray<
|
||||
VideoDescriptionHeader | ExpandableVideoDescriptionBody | VideoDescriptionMusicSection |
|
||||
VideoDescriptionInfocardsSection | VideoDescriptionTranscriptSection | VideoDescriptionTranscriptSection |
|
||||
VideoDescriptionCourseSection | HorizontalCardList | ReelShelf | VideoAttributesSectionView
|
||||
VideoDescriptionInfocardsSection | VideoDescriptionTranscriptSection |
|
||||
VideoDescriptionCourseSection | HorizontalCardList | ReelShelf | VideoAttributesSectionView |
|
||||
HowThisWasMadeSectionView
|
||||
>;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
@@ -24,7 +26,8 @@ export default class StructuredDescriptionContent extends YTNode {
|
||||
this.items = Parser.parseArray(data.items, [
|
||||
VideoDescriptionHeader, ExpandableVideoDescriptionBody, VideoDescriptionMusicSection,
|
||||
VideoDescriptionInfocardsSection, VideoDescriptionCourseSection, VideoDescriptionTranscriptSection,
|
||||
VideoDescriptionTranscriptSection, HorizontalCardList, ReelShelf, VideoAttributesSectionView
|
||||
VideoDescriptionTranscriptSection, HorizontalCardList, ReelShelf, VideoAttributesSectionView,
|
||||
HowThisWasMadeSectionView
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -201,6 +201,7 @@ export { default as HistorySuggestion } from './classes/HistorySuggestion.js';
|
||||
export { default as HorizontalCardList } from './classes/HorizontalCardList.js';
|
||||
export { default as HorizontalList } from './classes/HorizontalList.js';
|
||||
export { default as HorizontalMovieList } from './classes/HorizontalMovieList.js';
|
||||
export { default as HowThisWasMadeSectionView } from './classes/HowThisWasMadeSectionView.js';
|
||||
export { default as IconLink } from './classes/IconLink.js';
|
||||
export { default as ImageBannerView } from './classes/ImageBannerView.js';
|
||||
export { default as IncludingResultsFor } from './classes/IncludingResultsFor.js';
|
||||
|
||||
Reference in New Issue
Block a user