I try to follow pytube example for downloading video from YouTube:
from pytube import YouTube
video = YouTube('https://www.youtube.com/watch?v=BATOxzbVNno')
video.streams.all()
and immediately get this error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-2556eb2eb903> in <module>()
1 from pytube import YouTube
2 video = YouTube('https://www.youtube.com/watch?v=BATOxzbVNno')
----> 3 video.streams.all()
5 frames
/usr/local/lib/python3.7/dist-packages/pytube/cipher.py in get_throttling_function_code(js)
301 # Extract the code within curly braces for the function itself, and merge any split lines
302 code_lines_list = find_object_from_startpoint(js, match.span()[1]).split('\n')
--> 303 joined_lines = "".join(code_lines_list)
304
305 # Prepend function definition (e.g. `Dea=function(a)`)
AttributeError: 'NoneType' object has no attribute 'span'
Please help me. It worked fine just yesterday! Thanks a lot!