youtubei.js
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -145,2 +145,3 @@ 'use strict'; | ||
video_details.id = data.videoDetails.videoId; | ||
video_details.title = data.videoDetails.title; | ||
@@ -151,5 +152,7 @@ video_details.description = data.videoDetails.shortDescription; | ||
} else { | ||
const is_dislike_available = data[3].response.contents.singleColumnWatchNextResults.results.results.contents[1].slimVideoMetadataSectionRenderer.contents[1].slimVideoActionBarRenderer.buttons[1].slimMetadataToggleButtonRenderer.button.toggleButtonRenderer.defaultText.accessibility && true || false; | ||
metadata.embed = data[2].playerResponse.microformat.playerMicroformatRenderer.embed; | ||
metadata.likes = parseInt(data[3].response.contents.singleColumnWatchNextResults.results.results.contents[1].slimVideoMetadataSectionRenderer.contents[1].slimVideoActionBarRenderer.buttons[0].slimMetadataToggleButtonRenderer.button.toggleButtonRenderer.defaultText.accessibility.accessibilityData.label.replace(/\D/g, '')); | ||
metadata.dislikes = parseInt(data[3].response.contents.singleColumnWatchNextResults.results.results.contents[1].slimVideoMetadataSectionRenderer.contents[1].slimVideoActionBarRenderer.buttons[1].slimMetadataToggleButtonRenderer.button.toggleButtonRenderer.defaultText.accessibility.accessibilityData.label.replace(/\D/g, '')); | ||
metadata.dislikes = is_dislike_available && parseInt(data[3].response.contents.singleColumnWatchNextResults.results.results.contents[1].slimVideoMetadataSectionRenderer.contents[1].slimVideoActionBarRenderer.buttons[1].slimMetadataToggleButtonRenderer.button.toggleButtonRenderer.defaultText.accessibility.accessibilityData.label.replace(/\D/g, '')) || 0; | ||
metadata.view_count = parseInt(data[2].playerResponse.videoDetails.viewCount); | ||
@@ -172,2 +175,3 @@ metadata.average_rating = data[2].playerResponse.videoDetails.averageRating; | ||
video_details.id = data[2].playerResponse.videoDetails.videoId; | ||
video_details.title = data[2].playerResponse.videoDetails.title; | ||
@@ -174,0 +178,0 @@ video_details.description = data[2].playerResponse.videoDetails.shortDescription; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
try { | ||
let transformations = this.getTransformationData(this.raw_code); | ||
let transformations = this.getTransformationData(); | ||
transformations = transformations.map((el) => { | ||
@@ -20,0 +20,0 @@ if (el != null && typeof el != 'number') { |
{ | ||
"name": "youtubei.js", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "An object-oriented library that allows you to search, get detailed info about videos, subscribe, unsubscribe, like, dislike, comment, download videos and much more!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97214
1398