woob.capabilities.file
¶
- class BaseFile(id='', url=NotLoaded, backend=None)[source]¶
Bases:
BaseObject
Represent a file.
- 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 name
- property page_url¶
Get file page URL
- class CapFile[source]¶
Bases:
Capability
Provide file download
- SEARCH_RELEVANCE = 0¶
- SEARCH_RATING = 1¶
- SEARCH_VIEWS = 2¶
- SEARCH_DATE = 3¶
- search_file(pattern, sortby=SEARCH_RELEVANCE)[source]¶
- Parameters:
pattern (str) – pattern to search on
sortby – sort by … (user SEARCH_* constants) (default:
SEARCH_RELEVANCE
)
- Return type:
iter[
BaseFile
]