Traceback (most recent call last):
File "udemy-dl.py", line 924, in
main()
File "udemy-dl.py", line 879, in main
udemy.ExtractAndDownload(quality=res)
File "udemy-dl.py", line 291, in ExtractAndDownload
self.login()
File "udemy-dl.py", line 40, in login
extract_info.login(self.username, self.password)
File "/home/thesalah1212/udemy-dl-master/udemy/_extractor.py", line 147, in login
login_form = self._fill_login_form(login_popup, username, password)
File "/home/thesalah1212/udemy-dl-master/udemy/_extractor.py", line 98, in _fill_login_form
login_form = self._form_hidden_inputs('login-form', webpage)
File "/home/thesalah1212/udemy-dl-master/udemy/_extractor.py", line 88, in _form_hidden_inputs
return _hidden_inputs(form)
File "/home/thesalah1212/udemy-dl-master/udemy/_utils.py", line 80, in _hidden_inputs
html = re.sub(r'', '', html)
File "/usr/lib/python3.5/re.py", line 182, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
thesalah1212@thesalah1212-pc:~/udemy-dl-master$
I'm also getting this, upon inspecting the source code I found udemy is detecting this tool as automation, any way to hide this?
How to see it:
_extractor.py
line 80 def _form_hidden_inputs
print(html)
Ami also I get that error, and I started thinking that maybe we should update the python ?, I would like you to answer r0oth3x49
yup same here .. time to update the tool
@thesalah1212 the error is causing with python3 only will fix it ASAP. with python2 it works fine for me.
have a look.

Need solution for this error
@gangadharparde which python version are you using?
@thesalah1212 @ejose19 @YaNgO15 @coder797
here is a simple workaround for both python version (py2 & py3)
then try to download and let me know if still the error occurs.
i have done the above steps and tested against py2 & py3 both, for me works fine now.
python3
python2
From cffi callback
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
_lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
[-] : Connection error : make sure your internet connection is working.
Python 3.6.4
macOS High Sierra 10.13.3
Last version not work.
@r0oth3x49:
Python3.6
32 bit Windows 7
i have a question
is it download pdf and all other project files of course ?
I still get the error after downloading the new version and upgrading the packages.
@gangadharparde you should check this issue #56
I have tried python 2.712, 2.714, v3.5.2, v3.6.4 - all as fresh installs and downloading all the requirements and ensuring they are all up-to-date and I am using the latest version of udemy-dl. I am still getting the error mentioned by thesalah1212 at the start of this post.
I still get the error after updating the packages
@DazzaB73 it works fine after doing this command pip install requests[security]
Resolve after uninstall openssl pyhton package and reinstall it.
pip install pyOpenSSL, its works! I'm using python3.6.2
I can confirm that on Ubuntu Linux 16.04 installation of pyOpenSSL works.
Most helpful comment
@thesalah1212 @ejose19 @YaNgO15 @coder797
here is a simple workaround for both python version (py2 & py3)
then try to download and let me know if still the error occurs.
i have done the above steps and tested against py2 & py3 both, for me works fine now.


python3
python2