class Request(object_ref):
Known subclasses: scrapy.http.request.form.FormRequest
, scrapy.http.request.json_request.JsonRequest
, scrapy.http.request.rpc.XmlRpcRequest
Undocumented
Class Method | from_curl |
No summary |
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 Request |
Method | replace |
Create a new Request with the same attributes except for those given new values. |
Class Variable | body |
Undocumented |
Class Variable | url |
Undocumented |
Instance Variable | _body |
Undocumented |
Instance Variable | _cb_kwargs |
Undocumented |
Instance Variable | _encoding |
Undocumented |
Instance Variable | _meta |
Undocumented |
Instance Variable | _url |
Undocumented |
Instance Variable | callback |
Undocumented |
Instance Variable | cookies |
Undocumented |
Instance Variable | dont_filter |
Undocumented |
Instance Variable | errback |
Undocumented |
Instance Variable | flags |
Undocumented |
Instance Variable | headers |
Undocumented |
Instance Variable | method |
Undocumented |
Instance Variable | priority |
Undocumented |
Property | cb_kwargs |
Undocumented |
Property | encoding |
Undocumented |
Property | meta |
Undocumented |
Inherited from object_ref
:
Method | __new__ |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Create a Request object from a string containing a cURL command. It populates the HTTP method, the
URL, the headers, the cookies and the body. It accepts the same
arguments as the Request
class, taking preference and
overriding the values of the same arguments contained in the cURL
command.
Unrecognized options are ignored by default. To raise an error when finding unknown options call this method by passing ignore_unknown_options=False.
Caution
Using from_curl
from ~scrapy.http.Request
subclasses, such as ~scrapy.http.JSONRequest
, or
~scrapy.http.XmlRpcRequest
, as well as having
:ref:`downloader middlewares <topics-downloader-middleware>`
and
:ref:`spider middlewares <topics-spider-middleware>`
enabled, such as
~scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware
,
~scrapy.downloadermiddlewares.useragent.UserAgentMiddleware
,
or
~scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware
,
may modify the ~scrapy.http.Request
object.
To translate a cURL command into a Scrapy request, you may use curl2scrapy.
scrapy.http.request.form.FormRequest
, scrapy.http.request.json_request.JsonRequest
, scrapy.http.request.rpc.XmlRpcRequest
Undocumented
scrapy.http.request.json_request.JsonRequest