[BUG] Empty streams for some videos
See original GitHub issueFor some links, the streams
property is empty, and the get_audio_only()
method returns None. I’ve identified a few such links that seems to be reproducible. Here’s my test code that shows the problem:
from pytube import YouTube
FAILING = [
"https://www.youtube.com/watch?v=L6nrMAFCzhg",
"https://www.youtube.com/watch?v=T8de-31Hu7g",
"https://www.youtube.com/watch?v=Y08HWyVSMxg",
"https://www.youtube.com/watch?v=WchEW9LkK94",
]
OK = [
"https://www.youtube.com/watch?v=7lYMmW2kPpQ",
"https://www.youtube.com/watch?v=7eVQHt690nk",
"https://www.youtube.com/watch?v=4bscOLDng0o",
]
for fail in FAILING:
yt = YouTube(fail)
stream = yt.streams.get_audio_only()
# that's unexpected, stream shouldn't be None
assert stream is None
assert len(yt.streams) == 0
for ok in OK:
yt = YouTube(ok)
stream = yt.streams.get_audio_only()
# same code, different links - all good
assert stream is not None
assert len(yt.streams) > 0
I’ve tested on freshly created virtualenv and the newest pytube
. Same error on Windows and Ubuntu (WSL).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:23
Top Results From Across the Web
10 Simple Ways To Fix All Video Streaming Issues
The 10 methods to fix video streaming problems include: · Check the internet connectivity · Switch to a different streaming platform · Reduce...
Read more >Pytube yt.streams giving empty streams list for some videos
I'm trying to download this( http://youtube.com/watch?v=hnGWlry_H_Q ) or this ( https://www.youtube.com/watch?v=j4JQFz_8XxU ) from YouTube ...
Read more >Troubleshoot your YouTube live stream - Google Help
To fix it, get a new stream key in Live Control Room and update your encoder. Go to YouTube Studio. To open Live...
Read more >Videos not displaying in Streams - Microsoft Community Hub
Hi there, I've recorded 3 client call videos with Microsoft Teams. ... videos are also "empty", it really sound like a bug somewhere....
Read more >[Update: Nov. 30] YouTube bugs/issues & pending ...
IST 07:45 pm: Some YouTubers are reporting that they aren't able to stream because a “Live streaming isn't available right now” error keeps ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@KrishnarajT and @PC-02 I believe your problems are also fixed in the github repository, just not the pypi repository. You should also run python -m pip install git+https://github.com/nficano/pytube to install from source, and see if that fixes the problem for you.
@tfdahlin The links work now, looks like it was an issue caused by using 10.0.0. Thank you so much!