def to_frontier(cls, response): """response: Scrapy > Frontier""" return FrontierResponse(url=response.url, status_code=response.status, headers=response.headers, body=response.body, request=response.meta['frontier_request'])
def to_frontier(self, response): """response: Scrapy > Frontier""" return FrontierResponse(url=response.url, status_code=response.status_code, headers=response.headers, body=response.text, request=self._request_converter.to_frontier( response.request))
def to_frontier(self, scrapy_response): """response: Scrapy > Frontier""" frontier_request = scrapy_response.meta['frontier_request'] frontier_request.meta['scrapy_meta'] = scrapy_response.meta return FrontierResponse(url=scrapy_response.url, status_code=scrapy_response.status, headers=scrapy_response.headers, body=scrapy_response.body, request=frontier_request)
def to_frontier(self, scrapy_response): """response: Scrapy > Frontier""" frontier_request = scrapy_response.meta.get( 'frontier_request', self._request_converter.to_frontier(scrapy_response.request)) frontier_request.meta[b'scrapy_meta'] = scrapy_response.meta return FrontierResponse(url=scrapy_response.url, status_code=scrapy_response.status, headers=dict(scrapy_response.headers.items()), body=scrapy_response.body, request=frontier_request)
def to_frontier(self, scrapy_response): """response: Scrapy > Frontier""" frontier_request = scrapy_response.meta[b'frontier_request'] frontier_request.meta[b'scrapy_meta'] = scrapy_response.meta if 'redirect_urls' in scrapy_response.meta: frontier_request.meta[b'redirect_urls'] = scrapy_response.meta['redirect_urls'] del scrapy_response.meta[b'frontier_request'] return FrontierResponse(url=scrapy_response.url, status_code=scrapy_response.status, headers=scrapy_response.headers, body=scrapy_response.body, request=frontier_request)