Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@qodestack/dl-yt-playlist
Advanced tools
Download all YouTube videos (or audio only) from every video in a playlist!
You'll need a few things to use this project:
API_KEY
env variable.Say you have this code in a file named download.ts
:
import {downloadYoutubePlaylist} from 'dl-yt-playlist'
const {playlistId, apiKey} = process.env
const resultsMetadata = await downloadYoutubePlaylist({
// Required:
playlistId: <string>, // The YouTube playlist id
apiKey: <string>, // Your YouTube Data api key
directory: <string>, // The full path where you want to save everything
// Optional:
audioOnly: <boolean>, // `true` for audio MP3, `false` for video MP4 (default `false`)
getFullData: <boolean>, // `false` will only get the 1st 50 videos (default `false`)
maxLengthInSeconds: <number>, // Videos longer than this will be skipped (default `Infinity`)
downloadData: <boolean>, // `true` downloads the YouTube videos (default `true`)
downloadThumbnails: <boolean>, // `true` downloads jpg thumbnail files (default `true`)
})
Now you can use Bun to run the file:
bun run download.ts
Downloads will be organized into the following folder structure:
data
/<playlist name>
/video
<title> [<video id>].mp4
/audio
<title> [<video id>].mp3
/thumbnails
<video id>.jpg
responses.json
videoMetadata.json
/video | This folder will contain all the mp4 video files |
/audio | This folder will contain all the mp3 audio files |
/thumbnails | This folder will contain all the jpg thumbnail files |
responses.json | This file will contain all the responses from the YouTube api. This is useful for understanding the shape of the data. |
videoMetadata.json | This file will contain an array metadata on each video. See shape below |
Each video will have metadata stored in the videoMetadata.json
with the following shape:
{
id: string
title: string
channel: string
publishedAt: string
dateAddedToPlaylist: string
url: string
lengthInSeconds: number
}
FAQs
Download all videos (or audio only) from a YouTube playlist!
The npm package @qodestack/dl-yt-playlist receives a total of 94 weekly downloads. As such, @qodestack/dl-yt-playlist popularity was classified as not popular.
We found that @qodestack/dl-yt-playlist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.