dPenedo / ClipTube

ClipTube is a Python script designed to interact with the system clipboard and the yt-dlp Python library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ClipTube

ClipTube is a Python script designed to interact with the system clipboard and the yt-dlp Python library. In my case, I use "xclip" since I'm on a Unix-like system. However, I plan to implement an option for "clip" to accommodate Windows users in the future.

How to Install

Ensure that you have xclip installed on your system and the yt-dlp library. For yt-dpl:

  • Option 1 (install it directly):
pip install yt-dlp
  • Option 2 (install it on a virtual env):
# On your virtual env

pip install -r requirements.txt

For xclip in Debian based linux, for example:

sudo apt install xclip

For downloading MP3 files, you'll also need the ffmpeg binary installed on your system. On Debian-based systems, you can install it with:

sudo apt install ffmpeg

How to config

Navigate to the main.py file and manually update your download_location, mp3_format, mp4_format or clipboard_program:

DOWNLOAD_LOCATION = "/home/daniel/Descargas/youtube/"
MP3_FORMAT = ["-x", "--audio-format", "mp3"]
MP4_FORMAT = ["--remux-video", "mp4"]
CLIPBOARD_PROGRAM = "xclip"

How to use

  1. Copy the YouTube URL to your clipboard (Ctrl + C).
  2. Navigate to the cloned ClipTube directory in your terminal.
  3. Execute the following command:
# For Video downloading
$ python main.py -v
# For Audio downloading
$ python main.py -a

About

ClipTube is a Python script designed to interact with the system clipboard and the yt-dlp Python library.


Languages

Language:Python 100.0%