Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
fixed #569 (Problem downloading subtitles on some courses)..
Browse files Browse the repository at this point in the history
  • Loading branch information
r0oth3x49 committed Oct 4, 2020
1 parent 0f4537a commit 4187132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cookies.txt
new_cook.txt
new_cookies.txt
.udemy-dl.conf
.udemy-dl*.conf
pack.sublime-project
pack.sublime-workspace
# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 1 addition & 1 deletion udemy-dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def download_lecture(self, lecture, filepath, current, total, quality):
def download_subtitles(self, subtitles, filepath, language="en", keep_vtt=False):
"""This function will simply download the subtitles.."""
if language and subtitles:
subtitle = subtitles.pop()
subtitle = subtitles[0]
subtitles = subtitle.get_subtitle(language)
if subtitles:
for sub in subtitles:
Expand Down

0 comments on commit 4187132

Please sign in to comment.