Skip to content

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

from_content_type

Gregory Vigo Torres36ae635fbe47
diff --git a/scrapy/responsetypes.py b/scrapy/responsetypes.py
index 5b0bc50a5..3e3518e79 100644
--- a/scrapy/responsetypes.py
+++ b/scrapy/responsetypes.py
@@ -54,7 +54,7 @@ class ResponseTypes(object):
header """
if content_encoding:
return Response
- mimetype = content_type.split(';')[0].strip().lower()
+ mimetype = to_native_str(content_type).split(';')[0].strip().lower()
return self.from_mimetype(mimetype)
def from_content_disposition(self, content_disposition):