Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'cipher' #82

Open
Jabyer opened this issue May 31, 2020 · 1 comment
Open

KeyError: 'cipher' #82

Jabyer opened this issue May 31, 2020 · 1 comment

Comments

@Jabyer
Copy link

Jabyer commented May 31, 2020

in video: https://www.youtube.com/watch?v=sh9SBIMGLAI&t=2827s

Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\pytube\extract.py", line 297, in apply_descrambler
for format_item in formats
File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\pytube\extract.py", line 297, in
for format_item in formats
KeyError: 'url'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\MEGA\Programación\Python\Descargar videos de Youtube.py", line 19, in
YouTube(url).streams.first().download()
File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\pytube_main_.py", line 92, in init
self.descramble()
File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\pytube_main_.py", line 132, in descramble
apply_descrambler(self.player_config_args, fmt)
File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\pytube\extract.py", line 301, in apply_descrambler
parse_qs(formats[i]["cipher"]) for i, data in enumerate(formats)
File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\pytube\extract.py", line 301, in
parse_qs(formats[i]["cipher"]) for i, data in enumerate(formats)
KeyError: 'cipher'

@boidushya
Copy link

Refer to PR #80 , it is a potential fix to the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants