This Python script allows you to download videos or audio from YouTube, get top videos from a specific channel, or search for videos based on a query.
-
Download a Video/Audio:
python youtube_downloader.py download <video_link> <type> [-o <output_path>]
<video_link>
: YouTube video link.<type>
: Type of download, choose eithervideo
oraudio
.-o, --output
: (Optional) Output path to save the downloaded file. Default is the current directory.
-
Get Top Videos from a Channel: incomplete
python youtube_downloader.py channel <channel_name>
<channel_name>
: YouTube channel name.
-
Search Videos on YouTube: incomplete
python youtube_downloader.py search <query>
<query>
: Search query.
- Python 3.x
- PyTube library
-
Clone this repository:
git clone https://github.com/....
-
Install the required dependencies:
pip install -r requirements.txt
-
Download a video:
python youtube_downloader.py download https://www.youtube.com/watch?v=video_link video -o /path/to/save
-
Get top videos from a channel:
python youtube_downloader.py channel channel_name
-
Search for videos on YouTube:
python youtube_downloader.py search "search_query"
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to adjust the README according to your specific project structure and requirements. 🚀