r0oth3x49 / udemy-dl

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

Error when redownloading the course Beginning C++ Programming - From Beginner to Beyond #432

Closed hfcintergalactic closed 5 years ago

hfcintergalactic commented 5 years ago

Describe the bug When I try to redownload the course Beginning C++ Programming - From Beginner to Beyond, I get an error inside _shared.py

bytes_to_be_downloaded is equal to NONE and then this line produces an error:

if total_bytes_done < bytes_to_be_downloaded:

It would in any case be better to make those lines into if, elif elif structure instead of if,if,if

To Reproduce Steps to reproduce the behavior:

  1. https://www.udemy.com/beginning-c-plus-plus-programming/

  2. udemy-dl.py -u some@account.com -p "somepassword" https://www.udemy.com/beginning-c-plus-plus-programming

  3. See error:

Traceback (most recent call last): File "C:\Users\fhcag\Desktop\udemy downloader\udemy-dl.py", line 1432, in main() File "C:\Users\fhcag\Desktop\udemy downloader\udemy-dl.py", line 1428, in main udemy.course_download(path=options.output, quality=options.quality, unsafe=options.unsafe) File "C:\Users\fhcag\Desktop\udemy downloader\udemy-dl.py", line 500, in course_download self.download_lectures_and_captions(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=inner_index, lectures_count=lectures_count, lecture_subtitles=lecture_subtitles, lecture_assets=lecture_assets, filepath=filepath, unsafe=unsafe) File "C:\Users\fhcag\Desktop\udemy downloader\udemy-dl.py", line 418, in download_lectures_and_captions self.download_assets(lecture_assets=lecture_assets, filepath=filepath, unsafe=unsafe) File "C:\Users\fhcag\Desktop\udemy downloader\udemy-dl.py", line 327, in download_assets assets.download(filepath=filepath, unsafe=unsafe, quiet=True, callback=self.show_progress) File "C:\Users\fhcag\Desktop\udemy downloader\udemy_shared.py", line 179, in download if total_bytes_done < bytes_to_be_downloaded: TypeError: '<' not supported between instances of 'int' and 'NoneType'

Expected behavior I would expect the download to proceed correctly and not stop there randomly.

Python Environment (please complete the following information):

r0oth3x49 commented 5 years ago

@hfcintergalactic have changed it to default value 0 hope this works, if not i would need your account to reproduce and fix as i can't reproduce. for now i m closing the issue

hfcintergalactic commented 5 years ago

@r0oth3x49 , I can share the account details after making a temporary password, but not from here. do you have some email address or something else that we might use to share this sensitive information?

r0oth3x49 commented 5 years ago

@r0oth3x49 , I can share the account details after making a temporary password, but not from here. do you have some email address or something else that we might use to share this sensitive information?

You can send the details to my personal email:- nasir251292@gmail.com