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

Pytube on Linux server returns links not working. Strange problem

$
0
0

To make the problem clear I will give this code example :

from pytube import YouTubevideo = YouTube("https://www.youtube.com/watch?v=sMvk9kE94uE")streams = video.streams.filter(progressive=True)# let's say the video with 720p quality is the third one in the listprint(streams[2].url)

This exact code, when I run it on my windows 10 computer, it returns the right URL that can be downloaded, and when I run it on my ubuntu Linux server it returns a URL that doesn't work and just keeps loading.

Here is a photo :enter image description here

Sometimes, and only sometimes, the left code returns a correct URL.

I don't understand why is that. The only difference is the operating system.

Please try to provide me with any suggestion to solve this problem. If any more detail is needed, I will add it directly.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



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