class documentation

An object that represents an HTTP response, which is usually downloaded (by the Downloader) and fed to the Spiders for processing.

Method __init__ Undocumented
Method __repr__ Undocumented
Method copy Return a copy of this Response
Method css Shortcut method implemented only by responses whose content is text (subclasses of TextResponse).
Method follow Return a :class:`~.Request` instance to follow a link ``url``. It accepts the same arguments as ``Request.__init__`` method, but ``url`` can be a relative URL or a ``scrapy.link.Link`` object, not only an absolute URL.
Method follow_all .. versionadded:: 2.0
Method replace Create a new Response with the same attributes except for those given new values
Method urljoin Join this Response's url with a possible relative url to form an absolute interpretation of the latter.
Method xpath Shortcut method implemented only by responses whose content is text (subclasses of TextResponse).
Class Variable attributes A tuple of :class:`str` objects containing the name of all public attributes of the class that are also keyword parameters of the ``__init__`` method.
Class Variable body Undocumented
Class Variable url Undocumented
Instance Variable certificate Undocumented
Instance Variable flags Undocumented
Instance Variable headers Undocumented
Instance Variable ip_address Undocumented
Instance Variable protocol Undocumented
Instance Variable request Undocumented
Instance Variable status Undocumented
Property cb_kwargs Undocumented
Property meta Undocumented
Property text For subclasses of TextResponse, this will return the body as str
Method _get_body Undocumented
Method _get_url Undocumented
Method _set_body Undocumented
Method _set_url Undocumented
Instance Variable _body Undocumented
Instance Variable _url Undocumented

Inherited from object_ref:

Method __new__ Undocumented
Class Variable __slots__ Undocumented
def __init__(self, url: str, status=200, headers=None, body=b'', flags=None, request=None, certificate=None, ip_address=None, protocol=None): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def copy(self): (source)

Return a copy of this Response

def css(self, *a, **kw): (source)

Shortcut method implemented only by responses whose content is text (subclasses of TextResponse).

def follow(self, url, callback=None, method='GET', headers=None, body=None, cookies=None, meta=None, encoding='utf-8', priority=0, dont_filter=False, errback=None, cb_kwargs=None, flags=None) -> Request: (source)

Return a :class:`~.Request` instance to follow a link ``url``. It accepts the same arguments as ``Request.__init__`` method, but ``url`` can be a relative URL or a ``scrapy.link.Link`` object, not only an absolute URL. :class:`~.TextResponse` provides a :meth:`~.TextResponse.follow` method which supports selectors in addition to absolute/relative URLs and Link objects. .. versionadded:: 2.0 The *flags* parameter.

def follow_all(self, urls, callback=None, method='GET', headers=None, body=None, cookies=None, meta=None, encoding='utf-8', priority=0, dont_filter=False, errback=None, cb_kwargs=None, flags=None) -> Generator[Request, None, None]: (source)

.. versionadded:: 2.0 Return an iterable of :class:`~.Request` instances to follow all links in ``urls``. It accepts the same arguments as ``Request.__init__`` method, but elements of ``urls`` can be relative URLs or :class:`~scrapy.link.Link` objects, not only absolute URLs. :class:`~.TextResponse` provides a :meth:`~.TextResponse.follow_all` method which supports selectors in addition to absolute/relative URLs and Link objects.

def replace(self, *args, **kwargs): (source)

Create a new Response with the same attributes except for those given new values

def urljoin(self, url): (source)

Join this Response's url with a possible relative url to form an absolute interpretation of the latter.

def xpath(self, *a, **kw): (source)

Shortcut method implemented only by responses whose content is text (subclasses of TextResponse).

attributes: Tuple[str, ...] = (source)

A tuple of :class:`str` objects containing the name of all public attributes of the class that are also keyword parameters of the ``__init__`` method. Currently used by :meth:`Response.replace`.

Undocumented

Undocumented

certificate = (source)

Undocumented

Undocumented

Undocumented

ip_address = (source)

Undocumented

protocol = (source)

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

For subclasses of TextResponse, this will return the body as str

def _get_body(self): (source)

Undocumented

def _get_url(self): (source)

Undocumented

def _set_body(self, body): (source)

Undocumented

def _set_url(self, url: str): (source)

Undocumented