F
F
Fonker2022-03-03 18:21:29
YouTube
Fonker, 2022-03-03 18:21:29

Pytube How to find out what is the maximum quality on a video?

How to find out what is the maximum quality on the video? That is, if for example 1080P, then it will display that it is 1080, and so on

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2022-03-03
@Fonker

$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pytube import YouTube
>>> yt = YouTube('https://www.youtube.com/watch?v=bmXP-58FItA')
>>> yt.streams.filter(type='video').get_highest_resolution().resolution[0:-1]
'720'
>>>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question