Files
YouTube.js/lib/parser/contents/classes/SectionList.js
LuanRT 748e34758f feat: tidy things up and implement more renderers
- Finished Library parser
- Fixed search continuations
- Improved channel parser
- Improved playlist parser
- Added support for posts of type poll
- Improved History parser
- Removed redundant code
2022-06-20 03:02:42 -03:00

27 lines
684 B
JavaScript

'use strict';
const Parser = require('..');
class SectionList {
type = 'SectionList';
constructor(data) {
data.targetId
&& (this.target_id = data.targetId);
this.contents = Parser.parse(data.contents);
if (data.continuations) {
if (data.continuations[0].nextContinuationData) {
this.continuation = data.continuations[0].nextContinuationData.continuation;
} else if (data.continuations[0].reloadContinuationData) {
this.continuation = data.continuations[0].reloadContinuationData.continuation;
}
}
data.header &&
(data.header = Parser.parse(data.header));
}
}
module.exports = SectionList;