pytube: ValueError: too many values to unpack (expected 2)
Ran into this error in my main file i was using.
So i made the most basic version i could and still got that error. Running in python 3.8 64 bit
from pytube import YouTube
yt = YouTube('https://www.youtube.com/watch?v=jNQXAC9IVRw')
Error thrown:
Traceback (most recent call last): File "c:\Users\user\Documents\My scripting projects\yt download testr\test.py", line 4, in <module> yt = YouTube('https://www.youtube.com/watch?v=jNQXAC9IVRw') File "C:\Python38\lib\site-packages\pytube\__main__.py", line 92, in __init__ self.descramble() File "C:\Python38\lib\site-packages\pytube\__main__.py", line 140, in descramble apply_signature(self.player_config_args, fmt, self.js) File "C:\Python38\lib\site-packages\pytube\extract.py", line 225, in apply_signature cipher = Cipher(js=js) File "C:\Python38\lib\site-packages\pytube\cipher.py", line 31, in __init__ var, _ = self.transform_plan[0].split(".") ValueError: too many values to unpack (expected 2)
Is it just me or are you guys getting this error also?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 34
- Comments: 41 (4 by maintainers)
PR Open: https://github.com/nficano/pytube/pull/701
I patched and hosted this again. Looks like there was a merge conflict between this PR and #643
You can install directly from my repo like this:
or add the following to your
requirements.txt
@partriv I had trouble getting it to work too, what worked at the end was uninstalling, pytube3, installing pytubeX and replacing ALL the function patterns (not just the one changed) in cipher.py with the ones in #701 and obviously changing from extract.py in the line 301 the key from “cipher” to “signatureCipher”
Hope this helps 👍
@zuntah thank you.
I use this workaround until bug is fixed:
You need to install Youtube-DL for that