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:
- 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 extensionmime_type – (
str
) MIME Typeauthor – (
str
) File authordescription – (
str
) File descriptiondate – (
date
,datetime
) File publication datelast_update – (
date
,datetime
) Last update or last modified date (default: Not available)size – (
int
) File size in bytes (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=SEARCH_RELEVANCE)[source]¶
Iter results of a search on a pattern.
- Parameters:
pattern (str) – pattern to search on
sortby (SEARCH_*) – sort by… (default:
SEARCH_RELEVANCE
)
- Return type: