pytube: [BUG]'NoneType' object has no attribute 'span'
i just got the same error 3 days ago. I changed name = 'hha'
and it worked. now it shows the same error.
please help me out ad give a permanent solution.
till yesterday it worked well, but today it seems to be fixed
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 7
- Comments: 46
Links to this issue
Commits related to this issue
- Update cipher.py resolved these #1243 #1240 #1233 #1228 #1225 #1218 , as of 2022-02-08 — committed to ifahadone/pytube by ifahadone 2 years ago
name = re.escape(get_throttling_function_name(js))
then replace get_throttling_function_name function as follows
i think we have to shift to
youtube-dl
Cipher.py
def get_throttling_function_code(js: str) -> str: name = ‘sha’
Today short way ))))
For show it s working: https://youtube.impropy.me/
@ifahadone
Everything is working .
People’s can check it live.
https://youtube.impropy.me/
It 's Fahad solved version…
This works for me!! For those of you confused as I was about the name = re.escape(get_throttling_function_name(js)) part, You are not to change that in the file. Here is what I did:
Hope this works for you as well! And thank you guys for sharing this solution, It was driving me crazy.
This worked for me, thanks.
This Work Thanks Bro 😄
Are you serious? What language are you trying to write this in? This expression is always True in python. If you meant to search for brackets, in python it would look something like this:
is_Array = ‘[’ in function_name or ‘]’ in function_name
@ifahadone can you create a PR?
I’m getting a 500 Server Error:
This is the used URL: https://www.youtube.com/watch?v=8bAzi4zIqK0
I tried bringing latest changes from pytube and I’m getting this error when downloading the 720p:
pip install git+https://github.com/pytube/pytube.git
Result:
But it works if I download the 360p version 🤔
try this :
video.streams.filter(progressive=True).order_by('resolution').asc()
bro, pytube has issue with filesize function with this file, if you remember before downloading the video pytube always hit request filesize api , and it is breaking for this itag only. and this is inbuilt feature of pytube, that is currently breaking.
@rishabh3354
your video is not working because of your poor execution of code, the specific itag you are trying to use, has no
filesize
value, therefore you are getting KeyError: ‘content-length’.Please don’t spam and mislead the information without proper research and debugging. it will help a lot of people
I have just tested it, it works fine, please check if you are following the steps correctly, you can try any of this : steps or Clone or replace cipher.py
Thank you @ifahadone that was quick appreciate it