Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@onepunya/yt-converter-js
Advanced tools
# @onepunya/yt-converter-js
simple youtube convert and search, mp3 mp4 download
## Installation
To use this package, you need to have Node.js installed. You can install this package via npm:
```bash
npm install @onepunya/yt-converter-js
import { Youtube } from '@onepunya/yt-converter-js';
const youtube = new Youtube();
Use the search
method to search for videos based on a query.
const query = 'Kokoronashi';
youtube.search(query)
.then(result => {
console.log(result);
})
.catch(error => {
console.error('Error:', error);
});
Parameters:
query
(string): The search query string.Returns: A promise that resolves to an object with the following structure:
{
"status": "ok",
"mess": "",
"p": "search",
"items": [
{
"id": "video_id",
"title": "video_title",
"url": "https://www.youtube.com/watch?v=video_id"
}
]
}
Use the ytdlnew
method to convert a YouTube video to MP3 or MP4.
const videoUrl = 'https://www.youtube.com/watch?v=video_id';
youtube.download(videoUrl)
.then(result => {
console.log(result);
})
.catch(error => {
console.error('Error:', error);
});
Parameters:
videoUrl
(string): The URL of the YouTube video.Returns: A promise that resolves to an object with the following structure:
{
"title": "video_title",
"mp4DownloadLink": "link_to_mp4_file",
"mp3DownloadLink": "link_to_mp3_file"
}
Both methods return promises that will be rejected if an error occurs. Handle errors using .catch
in your promise chain.
This project is licensed under the MIT License
FAQs
```markdown # @onepunya/yt-converter-js
The npm package @onepunya/yt-converter-js receives a total of 176 weekly downloads. As such, @onepunya/yt-converter-js popularity was classified as not popular.
We found that @onepunya/yt-converter-js 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.