ytgrep
ytgrep is a CLI tool to search Youtube closed captions with a grep-like interface.
Requirements
Requires python >= 3.5
Installation
pip install ytgrep
Note: you must have pip’s bin folder on your PATH.
Purpose
ytgrep is particularly useful whilst looking for particular topic or keywords mentioned in a video.
For example, searching for the word ‘topoloigcal sort’ in MIT’s Open Courseware Lecture on DFS and topological sort:
Usage
usage: ytgrep.py [-h] [-e] [-v] [-links] pattern urls [urls ...]
Flags
-e <PATTERN> - specify a regular expression to match
-v - verbose, print debug information
-links - include the time shortcut link with each match (see example below)
More examples
Include timestamped links (e.g. <youtube URL>/&t=196s) to jump directly to part in video where keyword was mentioned.
$ ytgrep -links 'potassium' https://www.youtube.com/watch?v=OIYOshsEqmQ
Search with regular expression
ytgrep -e 'banana|potassium' https://www.youtube.com/watch?v=OIYOshsEqmQ
Search multiple urls
ytgrep 'banana' https://www.youtube.com/watch?v=LH5ay10RTGY https://www.youtube.com/watch?v=zFQWVN4xip0
Development
Run Tests
Note: Functional tests do download directly from Youtube
## All tests
python -m unittest discover
## Unit tests
python -m unittest discover test/unit
## Functional tests
python -m unittest discover test/functional
Metadata
Release files for ytgrep 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ytgrep-0.5.0.tar.gz | 7.6 kB | Without provenance | Details for ytgrep-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ytgrep-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for ytgrep-0.5.0-py3-none-any.whl |
Total release size: 18.3 kB
Release files / ytgrep-0.5.0.tar.gz
| Download URL | ytgrep-0.5.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df02bd644b8251d3f7836ee5b500740bb7f5234fd9c7206bb63d6619f7227af6
|
|
BLAKE2b-256 checksum How to use checksums |
fdbb9b85a6b29c1993a91257446c4d1a7a45f80db519a7f98358dfd4f180a0d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.1
|
Release files / ytgrep-0.5.0-py3-none-any.whl
| Download URL | ytgrep-0.5.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
179a082abaedb0daf2982e595feac072dd2041bcc28737e462e045044f39ffdd
|
|
BLAKE2b-256 checksum How to use checksums |
64f0ed82121b0626973407f8b1265977a2bbfa84eb3ae3a95da66144a8efa86a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.1
|
Security for ytgrep 0.5.0
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.