Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diogo364/youtube-downloader
https://github.com/diogo364/youtube-downloader
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/diogo364/youtube-downloader
- Owner: Diogo364
- License: mit
- Created: 2023-08-29T01:17:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-21T15:20:15.000Z (7 months ago)
- Last Synced: 2024-10-12T22:53:35.082Z (about 1 month ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTube Video Downloader
This Python script allows you to download YouTube videos using the Pytube library. You can provide either a list of video URLs directly as command-line arguments or specify an input file containing the URLs. The downloaded videos will be saved as MP4 files in the specified output directory.
## Prerequisites
- Python 3.x
- Pytube library## Installation
1. Clone or download this repository to your local machine.
2. Navigate to the project directory.```bash
cd youtube-downloader
```3. Install the required dependencies using pip.
```bash
pip install pytube
```## Usage
You can run the script from the command line using the following options:
```bash
python downloader.py [-h] [-o OUTPUT] [-i INPUT] [url [url ...]]
```### Arguments
- `-h`, `--help`: Show a help message and exit.
- `-o OUTPUT`, `--output OUTPUT`: Specify the output directory for downloaded videos. Default is "out".
- `-i INPUT`, `--input INPUT`: Path to an input file containing a list of video URLs.
- `url [url ...]`: One or more video URLs to download. You can provide multiple URLs separated by spaces.### Examples
1. Download videos by providing URLs directly:
```bash
python downloader.py -o downloads https://www.youtube.com/watch?v=video_url_1 https://www.youtube.com/watch?v=video_url_2
```2. Download videos using an input file:
Create a text file named `urls.txt` and add video URLs on separate lines.
```
https://www.youtube.com/watch?v=video_url_1
https://www.youtube.com/watch?v=video_url_2
```Run the script with the input file:
```bash
python downloader.py -i urls.txt -o downloads
```## Output
Downloaded videos will be saved as MP4 files in the specified output directory.
## Disclaimer
Please use this script responsibly and respect YouTube's terms of service. Downloading copyrighted content without proper authorization may violate YouTube's policies and legal regulations.
## License
This project is licensed under the [MIT License](LICENSE).
---
Feel free to contribute to the project, report issues, or suggest improvements!