woob.capabilities.gallery
¶
- class BaseGallery(_id, title=NotLoaded, url=NotLoaded, cardinality=NotLoaded, date=NotLoaded, rating=NotLoaded, rating_max=NotLoaded, thumbnail=NotLoaded, thumbnail_url=None, nsfw=False)[source]¶
Bases:
BaseObject
Represents a gallery.
This object has to be inherited to specify how to calculate the URL of the gallery from its ID.
- Variables
url – (
str
) urltitle – (
str
) Title of gallerydescription – (
str
) Description of gallerycardinality – (
int
) Cardinality of gallerydate – (
date
,datetime
) Date of galleryrating – (
float
) Rating of this galleryrating_max – (
float
) Max rating availablethumbnail – (
Thumbnail
) Thumbnail
- property page_url¶
Get URL to page of this gallery.
- class BaseImage(_id='', index=None, thumbnail=NotLoaded, url=NotLoaded, ext=NotLoaded, gallery=None)[source]¶
Bases:
BaseImage
Base class for images.
- Variables
url – (
str
) urltitle – (
str
) File titleext – (
str
) File extensionauthor – (
str
) File authordescription – (
str
) File descriptiondate – (
date
,datetime
) File publication datesize – (
int
) File size in bytes (default: Not available)rating – (
int
,float
) Rating (default: Not available)rating_max – (
int
,float
) Maximum rating (default: Not available)license – (
str
) License namensfw – (
bool
) Is this Not Safe For Work (default: False)thumbnail – (
Thumbnail
) Thumbnail of the imagedata – (
bytes
) Data of imageindex – (
int
) Usually page numbergallery – (
BaseGallery
) Reference to the Gallery object
- class CapGallery[source]¶
Bases:
Capability
This capability represents the ability for a website backend to provide videos.
- SEARCH_RELEVANCE = 0¶
- SEARCH_RATING = 1¶
- SEARCH_VIEWS = 2¶
- SEARCH_DATE = 3¶
- search_galleries(pattern, sortby=0)[source]¶
Iter results of a search on a pattern.
- Parameters
pattern (str) – pattern to search on
sortby (SEARCH_*) – sort by…
- Return type