Browse Source

if there is more than one subtitle for the language, use the first one

master
Liu DongMiao 10 years ago
parent
commit
7e660ac113
1 changed files with 2 additions and 0 deletions
  1. 2
      youtube_dl/extractor/youtube.py

2
youtube_dl/extractor/youtube.py

@ -493,6 +493,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
sub_lang_list = {} sub_lang_list = {}
for l in lang_list: for l in lang_list:
lang = l[1] lang = l[1]
if lang in sub_lang_list:
continue
params = compat_urllib_parse.urlencode({ params = compat_urllib_parse.urlencode({
'lang': lang, 'lang': lang,
'v': video_id, 'v': video_id,

Loading…
Cancel
Save