pytube / pytube

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.
https://pytube.io
The Unlicense
10.66k stars 2.38k forks source link

Now it doesn't work anymore. 2019-12-20 #531

Closed Jabyer closed 3 years ago

Jabyer commented 4 years ago

yt = YouTube(link) File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pytube__main.py", line 88, in init self.prefetch_init() File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pytube__main__.py", line 97, in prefetch_init self.init() File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pytube\main__.py", line 143, in init mixins.apply_descrambler(self.player_config_args, fmt) File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pytube\mixins.py", line 96, in apply_descrambler for i in stream_data[key].split(',') KeyError: 'url_encoded_fmt_stream_map'

rafaelmarques7 commented 4 years ago

I am having the same issue I believe:

from pytube import YouTube
yt = YouTube('https://www.youtube.com/watch?v=DC471a9qrU4')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/rafael/PycharmProjects/BlackHatPython/venv/lib/python3.6/site-packages/pytube/__main__.py", line 88, in __init__
    self.prefetch_init()
  File "/home/rafael/PycharmProjects/BlackHatPython/venv/lib/python3.6/site-packages/pytube/__main__.py", line 97, in prefetch_init
    self.init()
  File "/home/rafael/PycharmProjects/BlackHatPython/venv/lib/python3.6/site-packages/pytube/__main__.py", line 143, in init
    mixins.apply_descrambler(self.player_config_args, fmt)
  File "/home/rafael/PycharmProjects/BlackHatPython/venv/lib/python3.6/site-packages/pytube/mixins.py", line 96, in apply_descrambler
    for i in stream_data[key].split(',')
KeyError: 'url_encoded_fmt_stream_map'

I've been googling this for a while now. Looks like this issue has appeared in the past, and has now re-appeared. I really hope we can find a solution for it.

boidushya commented 4 years ago

Yeah same from my side

jaewoo-so commented 4 years ago

same here

giacaglia commented 4 years ago

Created a fix for this bug. If you want to install the package with the fix before it gets to the main package, run the following: pip3 install git+https://github.com/giacaglia/pytube.git

hbmartin commented 4 years ago

@Jabyer @rafaelmarques7 @nchos88 fixed in my Python 3 only fork: https://github.com/hbmartin/pytube3

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.