New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-youtube-music

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-youtube-music - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

4

package.json
{
"name": "node-youtube-music",
"description": "Unofficial YouTube Music API for Node.js",
"version": "0.1.7",
"version": "0.1.8",
"main": "dist/src/index.js",

@@ -25,3 +25,3 @@ "types": "dist/src/index.d.ts",

"build": "eslint src/**/* examples/**/* && tsc",
"test": "jest"
"test": "yarn build && jest"
},

@@ -28,0 +28,0 @@ "dependencies": {

@@ -31,27 +31,35 @@ import { MusicVideo } from './models';

};
}): MusicVideo => ({
youtubeId:
content.musicResponsiveListItemRenderer.flexColumns[0]
}): MusicVideo | null => {
if (
!content.musicResponsiveListItemRenderer.flexColumns[0]
.musicResponsiveListItemFlexColumnRenderer.text.runs[0].navigationEndpoint
.watchEndpoint.videoId,
title:
content.musicResponsiveListItemRenderer.flexColumns[0]
.musicResponsiveListItemFlexColumnRenderer.text.runs[0].text,
artist:
content.musicResponsiveListItemRenderer.flexColumns[1]
.musicResponsiveListItemFlexColumnRenderer.text.runs[0].text,
album:
content.musicResponsiveListItemRenderer.flexColumns[1]
.musicResponsiveListItemFlexColumnRenderer.text.runs[2].text,
thumbnailUrl: content.musicResponsiveListItemRenderer.thumbnail.musicThumbnailRenderer.thumbnail.thumbnails.pop()
?.url,
duration: {
label:
) {
return null;
}
return {
youtubeId:
content.musicResponsiveListItemRenderer.flexColumns[0]
.musicResponsiveListItemFlexColumnRenderer.text.runs[0]
.navigationEndpoint.watchEndpoint.videoId,
title:
content.musicResponsiveListItemRenderer.flexColumns[0]
.musicResponsiveListItemFlexColumnRenderer.text.runs[0].text,
artist:
content.musicResponsiveListItemRenderer.flexColumns[1]
.musicResponsiveListItemFlexColumnRenderer.text.runs[4].text,
totalSeconds: parseDuration(
.musicResponsiveListItemFlexColumnRenderer.text.runs[0].text,
album:
content.musicResponsiveListItemRenderer.flexColumns[1]
.musicResponsiveListItemFlexColumnRenderer.text.runs[4].text
),
},
});
.musicResponsiveListItemFlexColumnRenderer.text.runs[2].text,
thumbnailUrl: content.musicResponsiveListItemRenderer.thumbnail.musicThumbnailRenderer.thumbnail.thumbnails.pop()
?.url,
duration: {
label:
content.musicResponsiveListItemRenderer.flexColumns[1]
.musicResponsiveListItemFlexColumnRenderer.text.runs[4].text,
totalSeconds: parseDuration(
content.musicResponsiveListItemRenderer.flexColumns[1]
.musicResponsiveListItemFlexColumnRenderer.text.runs[4].text
),
},
};
};

@@ -41,3 +41,6 @@ import got from 'got';

try {
results.push(parseVideo(content));
const video = parseVideo(content);
if (video) {
results.push(video);
}
} catch (e) {

@@ -44,0 +47,0 @@ console.error(e);

Sorry, the diff of this file is not supported yet

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