class documentation

class Response(object_ref):

Known subclasses: scrapy.http.response.text.TextResponse

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method __str__ Undocumented
Method ​_get​_body Undocumented
Method ​_get​_url Undocumented
Method ​_set​_body Undocumented
Method ​_set​_url 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 No summary
Method follow​_all
New in version 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 body Undocumented
Class Variable url Undocumented
Instance Variable ​_body Undocumented
Instance 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

Inherited from object_ref:

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

Undocumented

def __str__(self):

Undocumented

def _get_body(self):

Undocumented

def _get_url(self):

Undocumented

def _set_body(self, body):

Undocumented

def _set_url(self, url):

Undocumented

def copy(self):
Return a copy of this Response
def css(self, *a, **kw):
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):

Return a ~.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.

~.TextResponse provides a ~.TextResponse.follow method which supports selectors in addition to absolute/relative URLs and Link objects.

New in version 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):
New in version 2.0.

Return an iterable of ~.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 ~scrapy.link.Link objects, not only absolute URLs.

~.TextResponse provides a ~.TextResponse.follow_all method which supports selectors in addition to absolute/relative URLs and Link objects.

def replace(self, *args, **kwargs):
Create a new Response with the same attributes except for those given new values.
def urljoin(self, url):
Join this Response's url with a possible relative url to form an absolute interpretation of the latter.
def xpath(self, *a, **kw):
Shortcut method implemented only by responses whose content is text (subclasses of TextResponse).
body =

Undocumented

url =

Undocumented

_body: bytes =

Undocumented

_url =

Undocumented

certificate =

Undocumented

flags =

Undocumented

headers =

Undocumented

ip_address =

Undocumented

protocol =

Undocumented

request =

Undocumented

status =

Undocumented

@property
cb_kwargs =

Undocumented

@property
meta =

Undocumented

@property
text =
For subclasses of TextResponse, this will return the body as str