A simple Python package for downloading videos and playlists from YouTube
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
YouTube Monk
A YouTube video and playlist downloader made in Python.
Report Bug
-
Request Feature
Installing the library
To install the library from PyPi, just run this command:
pip install yt-monk
Usage
Import the library and define the downloader object:
import yt_monk
downloader = yt_monk.Downloader()
Setting the options:
You can set the options using keyword arguments when defining the object:
downloader = yt_monk.Downloader(quality='720', codec='av1')
or you can set it using the options.useCustom function:
downloader = yt_monk.Downloader()
downloader.options.useCustom(quality='720', codec='av1')
Here are all the options you can set:
codec -> "h264", "av1", "vp9"
quality -> "max", "2160", "1440", "1080", "720", "480", "360", "240", "144"
file_name -> this can be set to any valid filename. you can use placeholders: <videoTitle>, <selectedQuality>, <selectedCodec>
file_type -> the file type can be either "video" or "audio"
audio_format -> "mp3", "ogg", "wav", "opus"
mute_audio -> True or False
overwrite_files -> this tells the program to overwrite existing files: True or False
overwrite_directories -> this tells the program to overwrite existing directories: True or False
download_directory -> the directory that the downloaded files will be saved to. you can use placeholder for default download directory like C:\users\name\Downloads\ on windows: <defaultDirectory>
ask_for_input -> if enabled, the code will ask whether or not to overwrite a file or a directory: True or False
Using JSON options file:
Alternatively, you can use a json file to set the options. You can download an example options.json file here. Then just tell the code to use the JSON file:
downloader = yt_monk.Downloader(json_path=r'path/to/options.json')
or you can do it like this:
downloader = yt_monk.Downloader()
downloader.options.useJson(json_path=r'path/to/options.json')
Downloading a video:
video_url = 'https://www.youtube.com/watch?v=9bZkp7q19f0'
downloader.downloadVideo(video_url)
Downloading a playlist:
playlist_url = 'https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi'
downloader.downloadPlaylist(playlist_url)
License
Distributed under the MIT License. See LICENSE.txt for more information.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yt_monk-0.1.1a2.tar.gz.
File metadata
- Download URL: yt_monk-0.1.1a2.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46b398cdae87e46d57ca55d8763655d5f83355b1fb6ce98a53e370e9b35f7162
|
|
| MD5 |
42a35f6136fb99760da68a0d8f19e8ac
|
|
| BLAKE2b-256 |
06b1e2927fd05b9e885c1ed22f7c69044bfd005dc9bc87f2865d751abd34307e
|
File details
Details for the file yt_monk-0.1.1a2-py3-none-any.whl.
File metadata
- Download URL: yt_monk-0.1.1a2-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31b68b7d6d2bde3d0e5b11d594e5a1b613355dadb321478f02a842ed10436eda
|
|
| MD5 |
59bcb0768da1cdad88fd986726a27175
|
|
| BLAKE2b-256 |
6e8ccf192a923dd9d82ffdbbd5be802fe36ee9ec95acca237c962a4488da03ef
|