r0oth3x49 / udemy-dl

A cross-platform python based utility to download courses from udemy for personal offline use.
MIT License
4.85k stars 1.2k forks source link

Error downloading a course #10

Closed tofanelli closed 7 years ago

tofanelli commented 7 years ago

Hi! How's going? hope ok...

I was trying to download a course with an outdated udemy-dl version, but every time the program falls in this error

Traceback (most recent call last): File "udemy-dl.py", line 475, in main() File "udemy-dl.py", line 406, in main udemy.ExtractAndDownload() File "udemy-dl.py", line 295, in ExtractAndDownload _url = max(urls, key=urls.get) ValueError: max() arg is an empty sequence

and stop... So, I updated the udemy-dl to the latest version, and tried to download the same course again, and got this error now

Traceback (most recent call last): File "udemy-dl.py", line 646, in main() File "udemy-dl.py", line 604, in main udemy.ExtractAndDownload() File "udemy-dl.py", line 362, in ExtractAndDownload out = self.Downloader(_url, lecture_name, chapter_path) File "udemy-dl.py", line 88, in Downloader out = course_dl.download(url, title, filepath=path, quiet=True, callback=sel f.Download) File "D:\udemy\udemy_downloader.py", line 72, in download response = compat_urlopen(req) File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ est.py", line 223, in urlopen return opener.open(url, data, timeout) File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ est.py", line 526, in open response = self._open(req, data) File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ est.py", line 544, in _open '_open', req) File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ est.py", line 504, in _call_chain result = func(*args) File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ est.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ est.py", line 1321, in do_open r = h.getresponse() File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\http\client .py", line 1331, in getresponse response.begin() File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\http\client .py", line 297, in begin version, status, reason = self._read_status() File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\http\client .py", line 266, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

any thoughts? =)

Cheers =)

r0oth3x49 commented 7 years ago

Update

@tofanelli thanks for the report. can you please explain a bit more and show me the screenshots if possible. i have tried to download this course and it worked for me. @tofanelli i have tested this on windows with python27 and it is working fine. POC WINDOWS Untitled.png POC MAC. poc.png

tofanelli commented 7 years ago

Well... this is quite weird.... I'm using Python 3.6.2.... this make any difference?