Skip to content

Commit

Permalink
print stacktrace on lecture download error
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Oct 13, 2021
1 parent 4ff903b commit 2c2e0a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ def _get(self, url):
return session
if not session.ok:
print('Failed request '+url)
print(f"{session.status_code} {session.reason}, retrying (attempt {i} )...")
print(
f"{session.status_code} {session.reason}, retrying (attempt {i} )...")
time.sleep(0.8)

def _post(self, url, data, redirect=True):
Expand Down Expand Up @@ -1080,7 +1081,8 @@ def process_lecture(lecture, lecture_path, lecture_file_name, quality, access_to
else:
download_aria(url, chapter_dir, lecture_title + ".mp4")
except EnvironmentError as e:
print(f" > Error downloading lecture: ", e)
print("> Error downloading lecture")
raise e
else:
print(
" > Lecture '%s' is already downloaded, skipping..." %
Expand Down

0 comments on commit 2c2e0a5

Please sign in to comment.