woob.capabilities.video

class woob.capabilities.video.BaseVideo(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.image.BaseImage

Represents a video.

This object has to be inherited to specify how to calculate the URL of the video from its ID.

Variables

duration – (timedelta) file duration

class woob.capabilities.video.CapVideo

Bases: woob.capabilities.image.CapImage

Video file provider.

get_video(_id)

Get a video file from an ID.

Parameters

_id (str) – video file ID

Return type

BaseVideo or None is fot found.

search_videos(pattern, sortby=0, nsfw=False)

search for a video file

Parameters
  • pattern (str) – pattern to search on

  • sortby – sort by… (use SEARCH_* constants)

  • nsfw (bool) – include non-suitable for work videos if True

Return type

iter[BaseVideo]