fcs.crawler.mime_content_type

class MimeContentType(mime_str)

Represents MIME type (e.g. image/jpeg, text/*).

Parameters:mime_str (string) – String containing MIME type and subtype (separated by semicolon)
type

Main type - before slash.

subtype

Subtype - after slash.

contains(other_mime)

Checks if method parameter is a subtype of this MIME type.

Parameters:other_mime (string) – MIME type to check as a potential subtype of this MIME type.
Returns:Information if method parameter is a subtype of this MIME type.
Return type:bool
one_of(mime_types)

Checks if one of the MIME types in parameter collection contains this type.

Parameters:mime_types (list) – Collection of MIME types.
Returns:Information if one of the MIME types in parameter collection contains this type.
Return type:bool