document.util Module¶
Misc functions.
-
wpull.document.util.detect_response_encoding(response, is_html=False, peek=131072)[source]¶ Return the likely encoding of the response document.
Parameters: - response (Response) – An instance of
http.Response. - is_html (bool) – See
util.detect_encoding(). - peek (int) – The maximum number of bytes of the document to be analyzed.
Returns: The codec name.
Return type: str,None- response (Response) – An instance of