My Coding > Programming language > Python > Python libraries and packages > YouTube manipulations

YouTube manipulations (Page: 1)

Go to Page:

  1. Pytube module;
  2. yt_dlp module;

WARNING: This library not working well anymore! Please read the next page on how to download YouTube videos now!

One of the very amazing Python modules. PyTube. Specially created for work with YouTube. For checking information about YouTybe video and download YouTube videos.

Installation pytube module

To install pytube module, use pip command


pip install pytube

Working example for downloading video

Simplest script to download YouTube video:

You need to import YouTube from pytube library

At the next step, create YouTube object linked to the video of your interest.

When the object is created, take its stream with highest resolution.

And at the last step – download it to your selected directory, current for example.


from pytube import YouTube

yt = YouTube("https://www.youtube.com/watch?v=_yco1ScF_c4")

yd = yt.streams.get_highest_resolution()

yd.download('./')

For more details, go to see the video:

Go to Page: 1; 2;


Published: 2022-12-20 23:01:58
Updated: 2024-11-27 19:16:02

Last 10 artitles


9 popular artitles

© 2020 MyCoding.uk -My blog about coding and further learning. This blog was writen with pure Perl and front-end output was performed with TemplateToolkit.