woob.capabilities.gallery
¶
-
class
woob.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:
woob.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 – (
str
) Title of gallerydescription – (
str
) Description of gallerycardinality – (
int
,int
) Cardinality of galleryrating – (
float
) Rating of this galleryrating_max – (
float
) Max rating availablethumbnail – (
Thumbnail
) Thumbnail
-
date
= <woob.capabilities.date.DateField object>¶
-
classmethod
id2url
(_id)¶ Overloaded in child classes provided by backends.
-
iter_image
()¶ Iter images.
-
property
page_url
¶ Get URL to page of this gallery.
-
class
woob.capabilities.gallery.
BaseImage
(_id='', index=None, thumbnail=NotLoaded, url=NotLoaded, ext=NotLoaded, gallery=None)¶ Bases:
weboob.capabilities.image.BaseImage
Base class for images.
-
gallery
= <woob.capabilities.base.Field object>¶
-
index
= <woob.capabilities.base.IntField object>¶
-
-
class
woob.capabilities.gallery.
CapGallery
¶ Bases:
woob.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
(_id)¶ 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
-
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
-