WebsiteData#
Added in version 2.16.
- class WebsiteData(*args, **kwargs)#
Data stored locally by a web site.
WebKitWebsiteData represents data stored in the client by a particular website.
A website is normally a set of URLs grouped by domain name. You can get the website name,
which is usually the domain, with get_name()
.
Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKitWebsiteData
with the name “Local files”.
A website can store different types of data in the client side. WebsiteDataTypes
is an enum containing
all the possible data types; use get_types()
to get the bitmask of data types.
It’s also possible to know the size of the data stored for some of the WebsiteDataTypes
by using
get_size()
.
A list of WebKitWebsiteData can be retrieved with fetch()
. See WebsiteDataManager
for more information.
Methods#
- class WebsiteData
- get_name() str #
Gets the name of
WebsiteData
.This is the website name, normally represented by a domain or host name. All local documents are grouped in the same
WebsiteData
using the name “Local files”.Added in version 2.16.
- get_size(types: WebsiteDataTypes) int #
Gets the size of the data of types
types
in aWebsiteData
.Note that currently the data size is only known for
DISK_CACHE
data type so for all other types 0 will be returned.Added in version 2.16.
- Parameters:
types – a bitmask of
WebsiteDataTypes
- get_types() WebsiteDataTypes #
Gets the types of data stored in the client for a
WebsiteData
.These are the types actually present, not the types queried with
fetch()
.Added in version 2.16.