Scrapy, a fast high-level web crawling & scraping framework for Python.
fix: jmespath
Jalil SA1eb44604853e
diff --git a/scrapy/http/response/text.py b/scrapy/http/response/text.pyindex 360d6334e..dd042a2bd 100644--- a/scrapy/http/response/text.py+++ b/scrapy/http/response/text.py@@ -140,7 +140,12 @@ class TextResponse(Response):return self._cached_selectordef jmespath(self, query, **kwargs):- return self.selector.jmespath(query, **kwargs)+ if not hasattr(self.selector, "jmespath"): # type: ignore[attr-defined]+ raise AttributeError(+ "Please install parsel >= 1.8.1 to get jmespath support"+ )++ return self.selector.jmespath(query, **kwargs) # type: ignore[attr-defined]def xpath(self, query, **kwargs):return self.selector.xpath(query, **kwargs)