[Chennaipy] Chennaipy - Monday Module - 13 Mar 2023
selvi dct
selvi.dct at gmail.com
Mon Mar 13 14:59:24 EDT 2023
Date: 13 Mar 2023
Module : pytube
Installation : pip install pytube
About:
pytube is a genuine, lightweight, dependency-free Python library (and
command-line utility) for downloading YouTube videos.
pytube also makes pipelining easy, allowing you to specify callback
functions for different download events, such as on progress or on complete.
Sample:
from pytube import YouTube
yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo')
vedio_file = yt.streams.filter(progressive=True,
file_extension='mp4').get_by_resolution('360p')
vedio_file.download("pycon_india.mp4")
print("download completed")
Output:
>> ls
pycon_india.mp4
Reference:
https://pypi.org/project/pytube/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20230314/08bbca00/attachment.html>
More information about the Chennaipy
mailing list