woob.capabilities.subtitle

class Subtitle(id='', name='', url=None)[source]

Bases: BaseObject

Subtitle object.

Variables:
  • url – (str) url

  • name – (str) Name of subtitle

  • ext – (str) Extension of file

  • nb_cd – (int) Number of cd or files

  • language – (str) Language of the subtitle

  • description – (str) Description of corresponding video

class CapSubtitle[source]

Bases: Capability

Subtitle providers.

iter_subtitles(pattern)[source]

Search subtitles and iterate on results.

Parameters:

pattern (str) – pattern to search

Return type:

iter[Subtitle]

get_subtitle(_id)[source]

Get a subtitle object from an ID.

Parameters:

_id (str) – ID of subtitle

Return type:

Subtitle

get_subtitle_file(_id)[source]

Get the content of the subtitle file.

Parameters:

_id (str) – ID of subtitle

Return type:

str