Issue: Pulling Video from Youtube
Hi,
When trying to pull videos from youtube, I receive the following error:
File "C:\Python\Sign-Language-Recognition--MediaPipe-DTW-master\yt_download.py", line 53, in
Any suggestions?
Ian
Hi,
When trying to pull videos from youtube, I receive the following error:
File "C:\Python\Sign-Language-Recognition--MediaPipe-DTW-master\yt_download.py", line 53, in download_video(*row) File "C:\Python\Sign-Language-Recognition--MediaPipe-DTW-master\yt_download.py", line 20, in download_video YouTube(f"https://www.youtube.com/watch?v={video_id}") File "C:\Python\Python38\lib\site-packages\pytube__main__.py", line 292, in streams return StreamQuery(self.fmt_streams) File "C:\Python\Python38\lib\site-packages\pytube__main__.py", line 177, in fmt_streams extract.apply_signature(stream_manifest, self.vid_info, self.js) File "C:\Python\Python38\lib\site-packages\pytube\extract.py", line 409, in apply_signature cipher = Cipher(js=js) File "C:\Python\Python38\lib\site-packages\pytube\cipher.py", line 43, in init self.throttling_plan = get_throttling_plan(js) File "C:\Python\Python38\lib\site-packages\pytube\cipher.py", line 387, in get_throttling_plan raw_code = get_throttling_function_code(js) File "C:\Python\Python38\lib\site-packages\pytube\cipher.py", line 301, in get_throttling_function_code code_lines_list = find_object_from_startpoint(js, match.span()[1]).split('\n') AttributeError: 'NoneType' object has no attribute 'span'
Any suggestions?
Ian
The problematic version was 11.0.1 and now has already been fixed, so you just need to upgrade to the newer version, and will be working fine again: pip install --upgrade pytube
its an issue with the newest pytube version, so use mrmechanik 's solution: https://github.com/pytube/pytube/issues/1678