pytube: NoneType' object has no attribute 'span' [BUG]
Before creating an issue
Please confirm that you are on the latest version of pytube by installing from the source.
You can do this by running python -m pip install git+https://github.com/pytube/pytube
.
Sometimes, the pypi library repository is not up to date, and your issue may have been fixed already!
Describe the bug A clear and concise description of what the bug is.
To Reproduce Please provide the following information:
- The video or playlist url that is causing the error.
- The code where the problem is occurring.
Expected behavior A clear and concise description of what you expected to happen.
Output If pytube raises an exception, please provide the full traceback for the exception.
System information Please provide the following information:
- Python version (run
python --version
) - Pytube version (run
print(pytube.__version__)
in python) - Command used to install pytube
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 17 (1 by maintainers)
Commits related to this issue
- #1233 — committed to sssiong/pytube by sssiong 2 years ago
- 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
Github is becoming a cesspool of idiots who can’t read, can’t write, can’t understand anything.
Don’t act surprised when developers leave this platform if people keep spamming like this.
name = re.escape(get_throttling_function_name(js))
Is it permanent fix or for only short time fix?
Got the same issue
yes I know 😄 but to statically assign a value like “hha” only because it solves the current problem should not be way of handling bugs. What if in the future instead of “hha” the value is “foo”? Then this would mean you need to adjust this line again with the new value. And this can go on and on…
statically assign “hha” as value to
name
should not be the correct way of handling this bug. I extended theget_throttling_function_name(js: str)
like following:The issue I guess is, the regex on line 269 is not expecting an array with it’s according index. I know this is not the most generic or best way of handling this kind of issue, but it gives an idea in which direction it should be handled.
cipher.py
name = “hha” no found
index = js.index(‘function(a){var b=a.split(“”)’) name = js[index-4:index-1]
can you help, cant fix
This really worked man !! How the heck did you figured out this ?
it 's work thanks , i am really interested
How do you know about “hha”?