Python 3 library for downloading YouTube Videos.
Project description
pytubefix
This python package is a solution to the problem with pytube regarding delays in updates
install:
pip install pytubefix
usage:
from pytubefix import YouTube
from pytubefix.cli import on_progress
url = input("URL >")
yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)
ys = yt.streams.get_highest_resolution()
ys.download()
If you want to save in .mp3 just pass the mp3=True parameter in the download() method, must be used together with the get_audio_only method:
from pytubefix import YouTube
from pytubefix.cli import on_progress
url = input("URL >")
yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)
ys = yt.streams.get_audio_only() # use this method -> get_audio_only()
ys.download(mp3=True) # pass the parameter mp3=Tre to save in .mp3
if you want to download complete playlists:
from pytubefix import YouTube
from pytubefix import Playlist
from pytubefix.cli import on_progress
url = input("URL Here >")
pl = Playlist(url)
for video in pl.videos:
ys = video.streams.get_audio_only()
ys.download(mp3=True) # pass the parameter mp3=Tre to save in .mp3
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
pytubefix-1.1.1.tar.gz
(66.7 kB
view details)
File details
Details for the file pytubefix-1.1.1.tar.gz.
File metadata
- Download URL: pytubefix-1.1.1.tar.gz
- Upload date:
- Size: 66.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4f2bc132facf428745fb2a554ba04feb82785fbd82950315a96bb2f3df6bdd6
|
|
| MD5 |
49c28dfde18efc1c213818637b81501e
|
|
| BLAKE2b-256 |
c1b94ae5cd63bbd52b9769415c17f7a10e9f2845962d48dac78f7e20cbdac037
|