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.
youtube-video-transcript
Advanced tools
A TypeScript Version of Youtube Transcript Api
This repository provides a simple and efficient way to interact with the YouTube Transcript API. It is designed to fetch transcripts from YouTube videos, with support for both single and multiple video transcripts.
Run this command to install it
npm i youtube-transcript-api
Quickly import and translate the video of your choice !
import Transcriptor from 'youtube-transcript-api';
await Transcriptor.getTranscript('url or video id', ['en'])
You will receive something like that
{
"language" : "en",
"type" : "auto",
"data" : [
{
"start": 0,
"duration": 6.339,
"text": "Hello everyone thanks you so much for the last video"
}
]
}
It's also possible to fetch transcripts in multiple language
import Transcriptor from 'youtube-transcript-api';
await Transcriptor.getTranscript('url or video id', ['en', 'es'])
You will receive something like that
{
"language" : "en",
"type" : "auto",
"data" : [
{
"start": 0,
"duration": 6.339,
"text": "Hello everyone thanks you so much for the last video"
}
]
},
{
"language" : "es",
"type" : "manual",
"data" : [
{
"start": 0,
"duration": 5.439,
"text": "¡Hola a todos, muchas gracias por el último video!"
}
]
}
If you want you can download multiple transcripts from different videos
import Transcriptor from 'youtube-transcript-api';
await Transcriptor.getTranscript(['url video 1', 'url video 2'], ['en'])
You will receive something like that
[
{
"language" : "en",
"type" : "auto",
"data" : [
{
"start": 0,
"duration": 6.339,
"text": "Hello everyone thanks you so much for the last video"
}
]
},
{
"language" : "en",
"type" : "auto",
"data" : [
{
"start": 0,
"duration": 1.219,
"text": "Welcome everybody !"
}
]
}
]
If you want you can fetch all the transcripts for a video by doing this
import Transcriptor from 'youtube-transcript-api';
const listTranscripts = await Transcriptor.listTranscripts('video url')
Then use this function to get all the transcripts as an array
listTranscripts.list()
Also you can filter this list to have only the transcripts who are generated
listTranscripts.getAuto()
Or who are created manually
listTranscripts.getManual()
In different languages
listTranscripts.getMultipleLanguages(['en', 'fr', 'es'])
MIT : Feel free to use to this plugin for any of your projects
FAQs
Youtube transcript api
The npm package youtube-video-transcript receives a total of 8 weekly downloads. As such, youtube-video-transcript popularity was classified as not popular.
We found that youtube-video-transcript 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.