module documentation
This module provides some useful functions for working with scrapy.http.Response objects
Function | get |
Return the base url of the given response, joined with the response url |
Function | get |
Parse the http-equiv refresh parameter from the given response |
Function | open |
Open the given response in a local web browser, populating the <base> tag for external links to work |
Function | response |
Return raw HTTP representation (as bytes) of the given response. This is provided only for reference, since it's not the exact stream of bytes that was received (that's not exposed by Twisted). |
Function | response |
Return status code plus status text descriptive message |
Variable | _baseurl |
Undocumented |
Variable | _metaref |
Undocumented |
def get_meta_refresh(response: 'script', 'noscript')) ->
scrapy.http.response.text.TextResponse
, ignore_tags: Optional[ Iterable[ str]]
= (Union[ Tuple[ None, None], Tuple[ float, str]]
:
(source)
¶
Parse the http-equiv refresh parameter from the given response
def open_in_browser(response:
Union[ scrapy.http.response.html.HtmlResponse, scrapy.http.response.text.TextResponse]
, _openfunc: Callable[ [ str], Any]
= webbrowser.open) -> Any
:
(source)
¶
Open the given response in a local web browser, populating the <base> tag for external links to work
Return raw HTTP representation (as bytes) of the given response. This is provided only for reference, since it's not the exact stream of bytes that was received (that's not exposed by Twisted).