Skip to main content

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

Author

matan h

License

This project is licensed under the MIT License.

created by

This library uploaded and manage using libtool

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mhyt-3.5.5.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

mhyt-3.5.5-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page