This project has been archived by its maintainers, and is no longer receiving any updates.
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.
Metadata
Release files for yt-monk 0.1.1a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yt_monk-0.1.1a2.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yt_monk-0.1.1a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.0 kB
Release files / yt_monk-0.1.1a2.tar.gz
| Download URL | yt_monk-0.1.1a2.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46b398cdae87e46d57ca55d8763655d5f83355b1fb6ce98a53e370e9b35f7162
|
|
BLAKE2b-256 checksum How to use checksums |
06b1e2927fd05b9e885c1ed22f7c69044bfd005dc9bc87f2865d751abd34307e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / yt_monk-0.1.1a2-py3-none-any.whl
| Download URL | yt_monk-0.1.1a2-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31b68b7d6d2bde3d0e5b11d594e5a1b613355dadb321478f02a842ed10436eda
|
|
BLAKE2b-256 checksum How to use checksums |
6e8ccf192a923dd9d82ffdbbd5be802fe36ee9ec95acca237c962a4488da03ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|