weboob.capabilities.subtitle

class weboob.capabilities.subtitle.Subtitle(id, name, url=None)

Bases: weboob.capabilities.base.BaseObject

Subtitle object.
Variables:
  • name – (unicode) Name of subtitle
  • ext – (unicode) Extension of file
  • nb_cd – (int, long) Number of cd or files
  • language – (unicode) Language of the subtitle
  • description – (unicode) Description of corresponding video
class weboob.capabilities.subtitle.CapSubtitle

Bases: weboob.capabilities.base.Capability

Subtitle providers.

get_subtitle(_id)

Get a subtitle object from an ID.

Parameters:_id (str) – ID of subtitle
Return type:Subtitle
get_subtitle_file(_id)

Get the content of the subtitle file.

Parameters:_id (str) – ID of subtitle
Return type:str
iter_subtitles(pattern)

Search subtitles and iterate on results.

Parameters:pattern (str) – pattern to search
Return type:iter[Subtitle]