Skip to main content

yt-fts

yt-fts is a simple python script that uses yt-dlp to scrape all of a youtube channels subtitles and load them into an sqlite database that is searchable from the command line. It allows you to query a channel for specific key word or phrase and will generate time stamped youtube urls to the video containing the keyword.

Installation

pip

pip install yt-fts

from source

git clone https://github.com/NotJoeMartinez/yt-fts
python3 -m venv .env
source .env/bin/activate
pip install -r requirements.txt
python3 -m yt-fts

Dependencies

This project requires yt-dlp installed globally. Platform specific installation instructions are available on the yt-dlp wiki.

pip

python3 -m pip install -U yt-dlp

MacOS/Homebrew

brew install yt-dlp

Windows/winget

winget install yt-dlp

Usage

Usage: yt-fts [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  delete    delete [channel id]
  download  download [channel url]
  export    export [channel id] [search text]
  list      Lists channels
  search    search [channel id] [search text]

download

Will download all of a channels vtt files into your database

yt-fts download "https://www.youtube.com/@TimDillonShow/videos"

--channel-id [youtube channel id]

If download fails you can manually input the channel id with the --channel-id flag. The channel url should still be an argument

yt-fts download --channel-id "UC4woSp8ITBoYDmjkukhEhxg" "https://www.youtube.com/@TimDillonShow/videos" 

--language [en/fr/es/etc..]

Specify subtitles language

yt-fts download --language de "https://www.youtube.com/@TimDillonShow/videos" 

--number-of-jobs [number]

Speed up downloads with multi threading

yt-fts download --number-of-jobs 6 "https://www.youtube.com/@TimDillonShow/videos"

list

List all of your downloaded channels

yt-fts list

output:

Listing channels
channel_id                channel_name         channel_url
------------------------  -------------------  ---------------------------------------------------------------
UC4woSp8ITBoYDmjkukhEhxg  The Tim Dillon Show  https://www.youtube.com/channel/UC4woSp8ITBoYDmjkukhEhxg/videos

Search a channel for text based off the channel id you give it and print a url to that point in the video

yt-fts search [channel_id] "text you want to find"

EX:

yt-fts search UC4woSp8ITBoYDmjkukhEhxg "life in the big city"

output:

Video title"("#208 - Let's Have A Party | The Tim Dillon Show - YouTube",)"

    Quote: "life in the big city Dan is wearing the"
    Time Stamp: 01:50:07.790
    Link: https://youtu.be/CJ_KAsz8rjQ?t=6604

Video title"('#176 - The Florida Project | The Tim Dillon Show - YouTube',)"

    Quote: "the show life in the big city love these"
    Time Stamp: 00:31:05.669
    Link: https://youtu.be/nKcqbHQndFQ?t=1862

Video title"('164 - Life In The Big City - YouTube',)"

    Quote: "life in the big city it was one of my"
    Time Stamp: 00:27:17.549
    Link: https://youtu.be/dqGyCTbzYmc?t=1634

Export

Similar to search except it will export all of the search results to a csv with the format: Video Title,Quote,Time Stamp,Link as it's headers

yt-fts export UC4woSp8ITBoYDmjkukhEhxg "life in the big city" 

Delete

Will delete a channel from your database

yt-fts delete [channel_id]

Metadata

Release files for yt-fts 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yt-fts 0.1.7
File Size Uploaded Provenance Actions
yt-fts-0.1.7.tar.gz 8.8 kB Without provenance Details for yt-fts-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yt-fts 0.1.7
File Interpreter ABI Platform Actions
yt_fts-0.1.7-py3-none-any.whl Python 3 none any Details for yt_fts-0.1.7-py3-none-any.whl

Total release size: 17.2 kB

Release files / yt-fts-0.1.7.tar.gz

Download URL yt-fts-0.1.7.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fe0cfc5ca81d8e7dcb869ef2e118103ab6d09bd5dbac269bbc68029a0e044d3c
BLAKE2b-256 checksum
How to use checksums
7a9fcbd294ca88a12436a881a7ba53f9fb1684ecda088821785d2f51b094995f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / yt_fts-0.1.7-py3-none-any.whl

Download URL yt_fts-0.1.7-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
079b60d7e9bfb2be82518747b20f8e9f085efefcb35f0f48d324842736ccd8f3
BLAKE2b-256 checksum
How to use checksums
9557bbb445715b3119f6bf327ac63c492b2cd16793364846dcc92801a374b040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for yt-fts 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page