hbmartin / pytube3

Deprecated, please see https://github.com/pytube3/pytube3
3 stars 1 forks source link

KeyError: 'cipher' #3

Open Akarsh711 opened 4 years ago

Akarsh711 commented 4 years ago

I am using the latest version and got this error

 c:\Users\iball\Desktop\yo_downloader>py test.py
Traceback (most recent call last):
  File "C:\Users\iball\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytube\extract.py", line 297, in apply_descrambler
    for format_item in formats
  File "C:\Users\iball\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytube\extract.py", line 297, in <listcomp>
    for format_item in formats
KeyError: 'url'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 5, in <module>
    yt = YouTube("https://youtu.be/831ur0X3kfk")
  File "C:\Users\iball\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytube\__main__.py", line 92, in __init__
    self.descramble()
  File "C:\Users\iball\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytube\__main__.py", line 132, in descramble
    apply_descrambler(self.player_config_args, fmt)
  File "C:\Users\iball\AppData\Local\Programs\Python\Python37-32\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\iball\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytube\extract.py", line 301, in <listcomp>
    parse_qs(formats[i]["cipher"]

test.py :

from pytube import YouTube
yt = YouTube("https://youtu.be/831ur0X3kfk")
godfrednanaowusu commented 4 years ago

I noticed i get this issue when youtube claims the video has copyright problems, i hope this helps solve the problem.

Akarsh711 commented 4 years ago

ya but that's not the case with me actually. I tried other downloader for same video and that's work.

TermoZour commented 4 years ago

I'm getting that same issue today. Also tried with a link embedded on a website and I can't play it back there either.

abbasbeydoun commented 4 years ago

Same issue here with this video

https://www.youtube.com/watch?v=hS5CfP8n_js