mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +00:00
- 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
27 lines
684 B
JavaScript
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; |