mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
refactor!: finish parser migration
Finally! :) This removes all code related to the old parser. #65
This commit is contained in:
20
lib/parser/classes/WatchCardCompactVideo.js
Normal file
20
lib/parser/classes/WatchCardCompactVideo.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
const Text = require('./Text');
|
||||
const { timeToSeconds } = require('../../utils/Utils');
|
||||
|
||||
class WatchCardCompactVideo {
|
||||
type = 'WatchCardCompactVideo';
|
||||
|
||||
constructor(data) {
|
||||
this.title = new Text(data.title);
|
||||
this.subtitle = new Text(data.subtitle);
|
||||
this.duration = {
|
||||
text: new Text(data.lengthText).toString(),
|
||||
seconds: timeToSeconds(data.lengthText.simpleText)
|
||||
};
|
||||
this.style = data.style;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = WatchCardCompactVideo;
|
||||
Reference in New Issue
Block a user