Skip to content

infraform/YT-DOWNLOADER-TMUX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YT DOWNLOADER

A PYTHON YOUTUBE DOWNLOADER FOR TERMUX ANDROID

USAGE

SETUP

Run the Following Commands to Install All The Required Libraries:

cd yt-downloader
bash install.sh

DOWNLOAD MP3

cd yt-downloader
python mp3.py

DOWNLOAD MP4

cd yt-downloader
python mp4.py

MODIFY THE CODE MIT

Make Sure to First Create A Folder in Your Internal Storage Before Cloning the Repository.
Example Path:

/sdcard/your_folder_name

Then Clone the Repository Into that Folder:

cd /sdcard/your_folder_name
git clone https://github.com/your-username/yt-downloader.git

FILE STRUCTURE

install.sh

#!/bin/bash

# Update packages and install Python & pip
pkg update -y
pkg install python -y

# Install required Python libraries
pip install pytube

mp3.py

from pytube import YouTube
import os

url = input("Enter YouTube video URL: ")
yt = YouTube(url)

print(f"Downloading audio: {yt.title}")
audio_stream = yt.streams.filter(only_audio=True).first()

output = audio_stream.download()
base, ext = os.path.splitext(output)
new_file = base + '.mp3'
os.rename(output, new_file)

print("Download completed:", new_file)

mp4.py

from pytube import YouTube

url = input("Enter YouTube video URL: ")
yt = YouTube(url)

print(f"Downloading video: {yt.title}")
video_stream = yt.streams.get_highest_resolution()

video_stream.download()

print("Download completed!")

✅ TESTED ON TERMUX / ANDROID
📜 DEVELOPED BY PYTHON & PYLIB

PayPal Donate QRIS Donate

About

A Python YouTube Downloader for Termux Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.1%
  • Shell 3.9%