src.core.http.response
index
/home/stanislav/PycharmProjects/opendoor/src/core/http/response.py

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
Development Team: Stanislav WEB

 
Classes
       
src.core.http.providers.response.ResponseProvider(__builtin__.object)
Response

 
class Response(src.core.http.providers.response.ResponseProvider)
    Response class
 
 
Method resolution order:
Response
src.core.http.providers.response.ResponseProvider
__builtin__.object

Methods defined here:
__init__(self, config, debug, **kwargs)
Response instance
:param src.lib.browser.config.Config config: configurations
:param src.lib.browser.debug.Debug debug: debugger
handle(self, response, request_url, items_size, total_size)
Response handler
:param urllib3.response.HTTPResponse response: response object
:param str request_url: url from request
:param int items_size: current items sizes
:param int total_size: response object
:raise ResponseError
:return: dict

Methods inherited from src.core.http.providers.response.ResponseProvider:
detect(self, request_url, response)
Detect response by status code
:param str request_url: request url
:param urllib3.response.HTTPResponse response: response object
:raise Exception
:return: str

Data descriptors inherited from src.core.http.providers.response.ResponseProvider:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
is_indexof
Check response as index of/ page
:return: bool

Data and other attributes inherited from src.core.http.providers.response.ResponseProvider:
DEFAULT_HTTP_BAD_REQUEST_STATUSES = [400]
DEFAULT_HTTP_FAILED_STATUSES = [404, 406, 429, 500, 501, 502, 503, 504]
DEFAULT_HTTP_FORBIDDEN_STATUSES = [401, 403]
DEFAULT_HTTP_REDIRECT_STATUSES = [301, 302, 303, 304, 307, 308]
DEFAULT_HTTP_SUCCESS_STATUSES = [100, 101, 200, 201, 202, 203, 204, 205, 206, 207, 208]
DEFAULT_SOURCE_DETECT_MIN_SIZE = 1000000
HTTP_DBG_LEVEL = 3
INDEX_OF_TITLE = 'Index of /'