
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
yt-video-text-md
is a Python package designed to retrieve and convert YouTube video transcripts/subtitles into Markdown files. This tool is particularly useful for extracting text from entire playlists or individual videos. It leverages the youtube-transcript-api
for direct subtitle extraction and whisper
for audio-to-text conversion when transcripts are unavailable.
whisper
to transcribe audio if subtitles are not available.To install the latest version directly from the GitHub repository, use:
pip install git+https://github.com/kothiyarajesh/yt-video-text-md.git
Clone the repository:
git clone https://github.com/kothiyarajesh/yt-video-text-md.git
Navigate to the project directory:
cd yt-video-text-md
Install the package:
python setup.py install
If installing from source, make sure to install the dependencies manually:
pip install -r requirements.txt
Here's a simple example of how to use the yt-video-text-md
library in a Python script:
from yt_video_text_md import YTVideoTextMD
# Define the URL of the YouTube video or playlist you want to process
video_url = "https://www.youtube.com/watch?v=pzo13OPXZS4"
# Specify the directory where the output Markdown file will be saved
output_directory = "."
# Set the default name for the generated Markdown file
markdown_file_name = "yt_video_2_text_md_"
# Define the directory where temporary audio files will be stored (Used only if a transcript is not available)
temporary_audio_directory = "/tmp"
# Create an instance of YTVideoTextMD with the specified parameters
YTVideoTextMD(
url=video_url,
output_dir=output_directory,
default_md_file_name=markdown_file_name,
audio_output_dir=temporary_audio_directory
)
You can also use the package from the command line:
yt-video-text-md -u "https://www.youtube.com/playlist?list=PLMrJAkhIeNNQV7wi9r7Kut8liLFMWQOXn" -d "." -f "playlist_video_" -ad "/tmp"
Options:
-u
or --url
: URL of the YouTube video or playlist.-d
or --output-dir
: Directory where the output Markdown file will be saved.-f
or --file-name
: Name for the generated Markdown file.-ad
or --audio-dir
: Directory where temporary audio files will be stored (used only if a transcript is not available).This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
Fetch YouTube video transcripts and save them to markdown files.
We found that yt-video-text-md 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.