weboob.capabilities.gallery

class weboob.capabilities.gallery.BaseGallery(_id, title=NotLoaded, url=NotLoaded, cardinality=NotLoaded, date=NotLoaded, rating=NotLoaded, rating_max=NotLoaded, thumbnail=NotLoaded, thumbnail_url=None, nsfw=False)

Bases: weboob.capabilities.base.BaseObject

Represents a gallery.

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

Variables:
  • title – (unicode) Title of gallery
  • description – (unicode) Description of gallery
  • cardinality – (int, long) Cardinality of gallery
  • date – (date, datetime) Date of gallery
  • rating – (float) Rating of this gallery
  • rating_max – (float) Max rating available
  • thumbnail – (Thumbnail) Thumbnail
classmethod id2url(_id)

Overloaded in child classes provided by backends.

iter_image()

Iter images.

page_url

Get URL to page of this gallery.

class weboob.capabilities.gallery.BaseImage(_id=u'', index=None, thumbnail=NotLoaded, url=NotLoaded, ext=NotLoaded, gallery=None)

Bases: weboob.capabilities.image.BaseImage

Base class for images.
Variables:
class weboob.capabilities.gallery.CapGallery

Bases: weboob.capabilities.base.Capability

This capability represents the ability for a website backend to provide videos.

SEARCH_DATE = 3
SEARCH_RATING = 1
SEARCH_RELEVANCE = 0
SEARCH_VIEWS = 2

Get gallery from an ID.

Parameters:_id (str) – the gallery id. It can be a numeric ID, or a page url, or so.
Return type:Gallery

Iterate images from a Gallery.

Return type:iter(BaseImage)
search_galleries(pattern, sortby=0)

Iter results of a search on a pattern.

Parameters:
  • pattern (str) – pattern to search on
  • sortby (SEARCH_*) – sort by...
Return type:

BaseGallery