Request¶
-
class
Request
(url, params=None, headers=None, *, timeout=None, max_retries=5, use_proxy=False, get_method='get', head_method='head', **request_kwargs)[source]¶ -
RELOAD_ATTRS
= ('response', 'head_response', 'success', 'head_success', 'text', 'json', 'bs', 'browser', 'page')¶
-
RESET_ATTRS
= ('response', 'head_response', 'success', 'head_success', 'text', 'json', 'bs', 'browser', 'page')¶
-
coroutine
all
(requests, *, timeout=None, predicate=None)[source]¶ Get all requests that fulfill predicate
- Parameters
- Return type
- Returns
List of Requests that fulfilled predicate
-
browser
¶
-
bs
¶ - Return type
BeautifulSoup
-
coroutine
first
(requests, *, timeout=None, predicate=None)[source]¶ Get first request that fulfills predicate (or None)
-
head_response
¶ - Return type
ClientResponse
-
headers
¶
-
page
¶
-
redirected_url
¶ - Return type
URL
-
response
¶ - Return type
ClientResponse
-
state
¶ Get a json serializable dictionary containing the state of this request.
- Return type
- Returns
Dict
-
coroutine
try_req
(req, *, predicate=None)[source]¶ Return request if it passes predicate, otherwise None
-
yarl
¶
-