Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ytdl-core

Package Overview
Dependencies
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ytdl-core - npm Package Compare versions

Comparing version 4.1.7 to 4.2.0

19

lib/info-extras.js

@@ -184,3 +184,2 @@ const utils = require('./utils');

[Symbol.toPrimitive]() {
// eslint-disable-next-line no-console
console.warn(`\`relatedVideo.author\` will be removed in a near future release, ` +

@@ -252,1 +251,19 @@ `use \`relatedVideo.author.name\` instead.`);

};
/**
* Cleans up a few fields on `videoDetails`.
*
* @param {Object} videoDetails
* @returns {Object}
*/
exports.cleanVideoDetails = videoDetails => {
videoDetails.thumbnails = videoDetails.thumbnail.thumbnails;
delete videoDetails.thumbnail;
utils.deprecate(videoDetails, 'thumbnail', { thumbnails: videoDetails.thumbnails },
'videoDetails.thumbnail.thumbnails', 'videoDetails.thumbnails');
videoDetails.description = videoDetails.shortDescription || getText(videoDetails.description);
delete videoDetails.shortDescription;
utils.deprecate(videoDetails, 'shortDescription', videoDetails.description,
'videoDetails.shortDescription', 'videoDetails.description');
return videoDetails;
};

4

lib/info.js

@@ -80,6 +80,6 @@ const urllib = require('url');

info.videoDetails = Object.assign({},
info.videoDetails = extras.cleanVideoDetails(Object.assign({},
info.player_response && info.player_response.microformat &&
info.player_response.microformat.playerMicroformatRenderer,
info.player_response && info.player_response.videoDetails, additional);
info.player_response && info.player_response.videoDetails, additional));

@@ -86,0 +86,0 @@ return info;

@@ -134,3 +134,2 @@ const miniget = require('miniget');

get: () => {
// eslint-disable-next-line no-console
console.warn(`\`${oldPath}\` will be removed in a near future release, ` +

@@ -137,0 +136,0 @@ `use \`${newPath}\` instead.`);

@@ -9,3 +9,3 @@ {

],
"version": "4.1.7",
"version": "4.2.0",
"repository": {

@@ -12,0 +12,0 @@ "type": "git",

@@ -158,3 +158,3 @@ # node-ytdl-core

Youtube updates their website all the time, it's not that rare for this to stop working. If it doesn't work for you and you're using the latest version, feel free to open up an issue. Make sure to check if there isn't one already with the same error.
YouTube updates their website all the time, it's not that rare for this to stop working. If it doesn't work for you and you're using the latest version, feel free to open up an issue. Make sure to check if there isn't one already with the same error.

@@ -161,0 +161,0 @@ Run the tests at `test/irl-test.js` to make sure this is really an issue with ytdl-core.

@@ -194,3 +194,3 @@ declare module 'ytdl-core' {

interface MoreVideoDetails extends Omit<VideoDetails, 'author'>, Omit<MicroformatRenderer, 'title' | 'description'> {
interface MoreVideoDetails extends Omit<VideoDetails, 'author' | 'thumbnail' | 'shortDescription'>, Omit<MicroformatRenderer, 'title' | 'description'> {
published: number;

@@ -203,2 +203,3 @@ video_url: string;

author: Author;
thumbnails: thumbnail[];
}

@@ -205,0 +206,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc