Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Remove unnecessary reference to private parsel.Selector._default_type (#5006)

Adrián Chaves2973d8d51abb
diff --git a/scrapy/selector/unified.py b/scrapy/selector/unified.py
index a25871433..08f08e8d7 100644
--- a/scrapy/selector/unified.py
+++ b/scrapy/selector/unified.py
@@ -69,7 +69,7 @@ class Selector(_ParselSelector, object_ref):
raise ValueError(f'{self.__class__.__name__}.__init__() received '
'both response and text')
- st = _st(response, type or self._default_type)
+ st = _st(response, type)
if text is not None:
response = _response_from_text(text, st)