Download subtitles from YouTube as plain text.
Project description
justsubs
Download subtitles from YouTube as plain text
Based on gist by glasslion.
2024-03-23: Tested on Windows, may fail on Linux.
Install
pip install justsubs
Latest:
git clone https://github.com/epogrebnyak/justsubs.git
cd justsubs
pip install -e .
Usage
1. List subtitle options
from justsubs import Video
video = Video("KzWS7gJX5Z8")
video.list_subs()
From the output above you will need a language slug like
en-uYU-mmqFLq8
as simple en
might not work.
2. Download subtitles
subs = Video("KzWS7gJX5Z8").subtitles(language="en-uYU-mmqFLq8")
subs.download()
3. Print as plain text
print(subs.get_plain_text()[:500])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
justsubs-0.1.1.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file justsubs-0.1.1.tar.gz
.
File metadata
- Download URL: justsubs-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e2ab82c777041895267d819b3ccfb4b8154e29514636b194f87aa86996cdba |
|
MD5 | fa6e79e42185f8d8d9841908a8f2bb91 |
|
BLAKE2b-256 | 28fc1a6f023fa0ac288920aedc75ea70e69cde847edffe8182ae78376dfd41f8 |
File details
Details for the file justsubs-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: justsubs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e50bf4b4b6b0055fdd9bab0aa74f3c643182046a7f3808201a38c64ca9ab24eb |
|
MD5 | fd2c7f55d7db0c96b3105ee9ed45cc95 |
|
BLAKE2b-256 | cc0d584cc9599ab3e7be71f8326502e17d760c7a6ea93945105e4f2b79ae03a6 |