CLI tool to search for YouTube videos and play selected video/audio via MPV
Project description
YouTerm
CLI tool to search for YouTube videos and play selected
video/audio via mpv
.
Requirements
YouTube API
This script retrieves video informations using YouTube APIs. An API key is needed. You can obtain one registering a Google develper profile, adding a project and creating an API key adding the YouTube Data API v3 service at this link.
Dependencies
This script does not rely on external Python dependencies, although it uses external programs to provide audio streaming:
mpv
youtube-dl
oryt-dlp
Optional dependencies
To store the YouTube API safely the unix standard password manager pass
is required. youterm
looks for one password entry containing the API key at
api/youtube
in the password-store[^1]. Alternatively you can pass the API key
as a flag to the program (see Usage) or hardcode it editing the
source code[^2]).
[^1]: Create entry using pass insert api/youtube
[^2]: Not recommended
Installation
Install youterm
using pip
:
pip3 install youterm
Usage
Invoking youterm
with no flags defaults to audio only. Below the usage:
usage: youterm [-h] [-v] [-r <n>] [-a <api_key>]
CLI tool to search for YouTube videos and play selected video/audio via MPV
options:
-h, --help show this help message and exit
-v, --video Play video
-r <n>, --results <n>
Number of search results displayed
-a <api_key>, --api <api_key>
YouTube Data v3 API key
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
Built Distribution
Hashes for youterm-0.0.4.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 166d0ff1c3f57abb78d5a16e2b7ba5c733f79876ed179b59e3a2ae6c4cc94e34 |
|
MD5 | be753ba23058a57004127966e052f9f5 |
|
BLAKE2b-256 | 022e4e3d00c063a64c31cb2e474f9a8fb10093a6b688d6ed0dd61f49b2347604 |