Reputation: 314
From a performance standpoint, I would like to know the difference between
response.selector.xpath
and
response.xpath
Is there a case where a new http request is made and not the other one?
Thanks
Upvotes: 0
Views: 89
Reputation: 431
They are the same.
If you look into Scrapy code, response.xpath()
actually uses selector.xpath()
.
def xpath(self, query, **kwargs):
return self.selector.xpath(query, **kwargs)
Is there a case where a new http request is made and not the other one?
Neither one generate a new http request.
Upvotes: 2