weboob.capabilities.image

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

Bases: weboob.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 – (str) Data of image
to_dict()
class weboob.capabilities.image.Thumbnail(url)

Bases: weboob.capabilities.image._BaseImage

Thumbnail of an image.
Variables:data – (str) Data
class weboob.capabilities.image.CapImage

Bases: weboob.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]