woob.capabilities.audiostream

class BaseAudioStream(id='', url=NotLoaded, backend=None)[source]

Bases: BaseAudio

Audio stream object

Variables:
  • url – (str) url

  • title – (str) File title

  • ext – (str) File extension

  • mime_type – (str) MIME Type

  • author – (str) File author

  • description – (str) File description

  • date – (date, datetime) File publication date

  • last_update – (date, datetime) Last update or last modified date (default: Not available)

  • size – (int) File size in bytes (default: Not available)

  • rating – (int, float) Rating (default: Not available)

  • rating_max – (int, float) Maximum rating (default: Not available)

  • license – (str) License name

  • duration – (timedelta) file duration

  • bitrate – (int) file bit rate in Kbps

  • format – (str) file format

  • thumbnail – (Thumbnail) Image associated to the file

  • current – (StreamInfo) Information related to current broadcast

class CapAudioStream[source]

Bases: CapAudio

Audio streams provider

search_audiostreams(pattern, sortby=CapFile.SEARCH_RELEVANCE)[source]

Search an audio stream

Parameters:
  • pattern (str) – pattern to search

  • sortby – sort by … (use SEARCH_* constants) (default: CapFile.SEARCH_RELEVANCE)

Return type:

iter[BaseAudioStream]

get_audiostream(_id)[source]

Get an audio stream

Parameters:

_id – Audiostream ID

Return type:

BaseAudioStream