Open boidushya opened 4 years ago
Easy to reproduce:
>>> from pytube import YouTube
>>> YouTube('https://www.youtube.com/watch?v=fKopy74weus').streams.get_highest_resolution().download()
Traceback (most recent call last):
File "/pytube/extract.py", line 288, in apply_descrambler
stream_data[key] = [
File "/pytube/extract.py", line 290, in <listcomp>
"url": format_item["url"],
KeyError: 'url'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/pytube/__main__.py", line 92, in __init__
self.descramble()
File "/pytube/__main__.py", line 132, in descramble
apply_descrambler(self.player_config_args, fmt)
File "/pytube/extract.py", line 300, in apply_descrambler
cipher_url = [
File "/pytube/extract.py", line 301, in <listcomp>
parse_qs(formats[i]["cipher"]) for i, data in enumerate(formats)
KeyError: 'cipher'
Update: Pull request #80 fixed it for me. Seemed like it was a YouTube change after all. @hbmartin please merge the PR🙏
pip install git+https://github.com/apdug/pytube3.git@5ac96de69f025b09abf2a6a24a4103c78b7e4c81
for the time being
Video URL I was using last( I used a lot of links in context to this video to check and none worked ): https://youtu.be/7jaN9B5zLzQ Not sure but might be a YouTube change thing