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

ytmusic_api_unofficial

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ytmusic_api_unofficial - npm Package Compare versions

Comparing version 1.1.0-beta.1.4 to 1.1.0-beta.1.5

23

dist/managers/searchManager.js

@@ -34,7 +34,24 @@ "use strict";

}).then((res) => __awaiter(void 0, void 0, void 0, function* () {
let ids = JSON.stringify(res.data).match(/videoId\W+"(\w*)"/gmi).map(videoID => videoID.match(/"(\w*)"/)[1]);
ids = [...new Set(ids)];
let ids = JSON.stringify(res.data).match(/videoId\W+"(\w*)"([\n|\w|\W]?)+?musicVideoType\W+"(\w*)/gmi).map(videoID => {
return {
id: videoID.match(/videoId\W+"(\w*)"([\n|\w|\W]?)+?musicVideoType\W+"(\w*)/mi)[1],
type: videoID.match(/videoId\W+"(\w*)"([\n|\w|\W]?)+?musicVideoType\W+"(\w*)/mi)[3]
};
});
let ids2 = [];
// Remove duplicate
ids.filter((item, index) => {
return ids2.find((e) => e.id === item.id) ? false : ids2.push(item);
});
ids = ids2;
const resp_data = [];
// Filter by type
if (type === TypeSearch.MUSIC) {
ids = ids.filter((e) => TypeSearch.MUSIC_values.includes(e.type));
}
else if (type === TypeSearch.VIDEO) {
ids = ids.filter((e) => TypeSearch.VIDEO_values.includes(e.type));
}
for (const id of ids) {
resp_data.push(new Music_1.Music((0, extract_1.extract_dataFromGetData)(yield GetData(id))));
resp_data.push(new Music_1.Music((0, extract_1.extract_dataFromGetData)(yield GetData(id.id))));
}

@@ -41,0 +58,0 @@ return resp_data;

2

package.json
{
"name": "ytmusic_api_unofficial",
"version": "1.1.0-beta.1.4",
"version": "1.1.0-beta.1.5",
"description": "A simple API to get music from YouTube Music",

@@ -5,0 +5,0 @@ "scripts": {

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