woob.capabilities.image

class woob.capabilities.image.BaseImage(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.image._BaseImage

Represents an image file.

Variables
  • nsfw – (bool) Is this Not Safe For Work (default: False)

  • thumbnail – (Thumbnail) Thumbnail of the image

  • data – (bytes) Data of image

to_dict()
class woob.capabilities.image.CapImage

Bases: woob.capabilities.file.CapFile

Image file provider

get_image(_id)

Get an image file from an ID.

Parameters

id (str) – image file ID

Return type

BaseImage]

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

search for an image file

Parameters
  • pattern (str) – pattern to search on

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

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

Return type

iter[BaseImage]

class woob.capabilities.image.Thumbnail(url)

Bases: woob.capabilities.image._BaseImage

Thumbnail of an image.

Variables

data – (bytes) Data