mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 07:17:07 -05:00 
			
		
		
		
	[lynda] Skip invalid subtitles (closes #15159)
This commit is contained in:
		@@ -244,8 +244,9 @@ class LyndaIE(LyndaBaseIE):
 | 
			
		||||
    def _get_subtitles(self, video_id):
 | 
			
		||||
        url = 'https://www.lynda.com/ajax/player?videoId=%s&type=transcript' % video_id
 | 
			
		||||
        subs = self._download_json(url, None, False)
 | 
			
		||||
        if subs:
 | 
			
		||||
            return {'en': [{'ext': 'srt', 'data': self._fix_subtitles(subs)}]}
 | 
			
		||||
        fixed_subs = self._fix_subtitles(subs)
 | 
			
		||||
        if fixed_subs:
 | 
			
		||||
            return {'en': [{'ext': 'srt', 'data': fixed_subs}]}
 | 
			
		||||
        else:
 | 
			
		||||
            return {}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user