@ -1000,21 +1000,19 @@ class InfoExtractor(object):
return not any_restricted
return not any_restricted
def extract_subtitles ( self , * args , * * kwargs ) :
def extract_subtitles ( self , * args , * * kwargs ) :
subtitles = { }
if ( self . _downloader . params . get ( ' writesubtitles ' , False ) or
list_subtitles = self . _downloader . params . get ( ' listsubtitles ' )
self . _downloader . params . get ( ' listsubtitles ' ) ) :
if self . _downloader . params . get ( ' writesubtitles ' , False ) or list_subtitles :
return self . _get_subtitles ( * args , * * kwargs )
subtitles . update ( self . _get_subtitles ( * args , * * kwargs ) )
return { }
return subtitles
def _get_subtitles ( self , * args , * * kwargs ) :
def _get_subtitles ( self , * args , * * kwargs ) :
raise NotImplementedError ( " This method must be implemented by subclasses " )
raise NotImplementedError ( " This method must be implemented by subclasses " )
def extract_automatic_captions ( self , * args , * * kwargs ) :
def extract_automatic_captions ( self , * args , * * kwargs ) :
automatic_captions = { }
if ( self . _downloader . params . get ( ' writeautomaticsub ' , False ) or
list_subtitles = self . _downloader . params . get ( ' listsubtitles ' )
self . _downloader . params . get ( ' listsubtitles ' ) ) :
if self . _downloader . params . get ( ' writeautomaticsub ' , False ) or list_subtitles :
return self . _get_automatic_captions ( * args , * * kwargs )
automatic_captions . update ( self . _get_automatic_captions ( * args , * * kwargs ) )
return { }
return automatic_captions
def _get_automatic_captions ( self , * args , * * kwargs ) :
def _get_automatic_captions ( self , * args , * * kwargs ) :
raise NotImplementedError ( " This method must be implemented by subclasses " )
raise NotImplementedError ( " This method must be implemented by subclasses " )