download files from youtube using simple code
Project description
mhyt
mhyt is a Python library for download movies and music from youtube
mhyt can run in python 3+
examples
from mhyt import yt_download
url = "https://www.youtube.com/watch?v=0BVqFYParRs"
file = "Clouds.mp4"
yt_download(url,file)
#########################
file = "Clouds_music.mp3"
yt_download(url,file,ismusic=True)
The audio example is not fully working because ytdl downloads a webm format. To fix this you can do:
from mhyt import yt_download
url = "https://www.youtube.com/watch?v=0BVqFYParRs"
file = "Clouds_music.mp3"
tmp_file = "Clouds_music.webm"
yt_download(url,tmp_file,ismusic=True,codec = "mp3")
Clouds_music.mp3 will be in correct mp3 format. It will create and delete Clouds_music.webm (the tmp file) automatically.
Installing
To install with pip:
(sudo) pip install mhyt
Built With
- youtube_dl - to download files from youtube
- imageio-ffmpeg - to download ffmpeg
Author
matan h
License
This project is licensed under the MIT License.
created by
This library uploaded and manage using libtool
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 mhyt-3.5.5.tar.gz.
File metadata
- Download URL: mhyt-3.5.5.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b369b40b39633b166e8d8ede98e4080cc73d676b051c12e063399e3865d6891
|
|
| MD5 |
f78e658a2e1081f8e7201ce9e0a1df61
|
|
| BLAKE2b-256 |
7785da0f61cbc7be6fc04e309c910458169c8dfcafdd500282d60e65160c1105
|
File details
Details for the file mhyt-3.5.5-py3-none-any.whl.
File metadata
- Download URL: mhyt-3.5.5-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c194a1023e27f5c18a1e6268ba29618f7a9461ea833ea96d673f3ab9ef24883
|
|
| MD5 |
a08e19daa1eb64837ab3d27f8f90c205
|
|
| BLAKE2b-256 |
ce7e9c3d3df53f794fc101c022f7e83681e405a47382597332911db3b13ed19f
|