mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +00:00
Things were getting a bit complicated and slow with the old parser so I decided to continue #44's work on the main codebase.
20 lines
480 B
JavaScript
20 lines
480 B
JavaScript
'use strict';
|
|
|
|
const Thumbnail = require('../Thumbnail');
|
|
|
|
class AnalyticsVideo {
|
|
type = 'video';
|
|
|
|
constructor(data) {
|
|
this.title = data.videoTitle;
|
|
this.metadata = {
|
|
views: data.videoDescription.split('·')[0].trim(),
|
|
published: data.videoDescription.split('·')[1].trim(),
|
|
thumbnails: new Thumbnail(data.thumbnailDetails).thumbnails,
|
|
duration: data.formattedLength,
|
|
is_short: data.isShort
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = AnalyticsVideo; |