
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
ytmusic-api-proxy
Advanced tools
YouTube Music API (Unofficial) is a YouTube Music data scraper. It comes with TypeScript support API for return types. The package is published to NPM.
I used to use youtube-music-api as my youtube music api data scraper. I liked looking into the source code of how it works but it never made sense to me. I also didn't like that there were no TypeScript annotations for the return types of methods. Because of this, I decided to build my own version of a youtube music api with TypeScript annotations, testing and written in a way I can understand.
npm install ytmusic-api-proxy
ES Modules (import):
import YTMusic from "ytmusic-api-proxy"
const ytmusic = new YTMusic()
await ytmusic.initialize(/* Optional: Custom cookies */)
ytmusic.search("Never gonna give you up").then(songs => {
console.log(songs)
})
CommonJS (require):
const YTMusic = require("ytmusic-api-proxy").default
const ytmusic = new YTMusic()
await ytmusic.initialize(/* Optional: Custom cookies */)
ytmusic.search("Never gonna give you up").then(songs => {
console.log(songs)
})
import YTMusic from "ytmusic-api-proxy"
// Option 1: Pass proxy config in constructor
const ytmusic = new YTMusic({
protocol: "http", // or "https", "socks4", "socks5"
host: "proxy.example.com",
port: 8080,
auth: { // Optional authentication
username: "your_username",
password: "your_password"
}
})
await ytmusic.initialize()
// Option 2: Pass proxy config in initialize method
const ytmusic2 = new YTMusic()
await ytmusic2.initialize({
proxy: {
protocol: "http",
host: "proxy.example.com",
port: 8080
}
})
ytmusic.search("Never gonna give you up").then(songs => {
console.log(songs)
})
The proxy configuration supports:
protocol: "http"
or protocol: "https"
protocol: "socks4"
or protocol: "socks5"
auth
object with username
and password
A lot of the credit should go to youtube-music-api. I build this package as a refactored and tested version of youtube-music-api with TypeScript annotations
YTMusic API's data return types are tested with Bun Test. To run the tests, run the command
$ bun test
FAQs
YouTube Music API
The npm package ytmusic-api-proxy receives a total of 4 weekly downloads. As such, ytmusic-api-proxy popularity was classified as not popular.
We found that ytmusic-api-proxy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.