Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3722

Pytube not all available video qualities are showing | Python 3.9

$
0
0

I'm programming a youtube video downloader that allows you to download youtube videos in different resolutions and refresh rates. However, when I try to list the available resolutions and fps, I weirdly only get lower quality options. In my code example I am using the YouTube Rewind 2019 video that is used for an example in the docs. Here is my code:

from pytube import YouTubeyoutube = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo')for stream in youtube.streams.filter(progressive=True):    print("resolution: " + stream.resolution)    print("fps: " + str(stream.fps))    print("----------------------")

and here is my output:

/mnt/d/youtube-downloader$ python3 main.pyresolution: 360pfps: 24----------------------resolution: 720pfps: 24----------------------

As you can see the only qualities I get are 720p and 360p although the youtube video used can scale all the way up to 1080p. Is there a different function I should be aware of.

I've also found a closed GitHub issue which seems to be similar to mine but doesn't have an answer I can work with which is why I've posted this issue here.

Thanks for your time.


Viewing all articles
Browse latest Browse all 3722

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>