def from_mimetype(self, mimetype):
        """Return the most appropriate Response class for the given mimetype"""
        if mimetype is None:
            return Response
        elif mimetype in self.classes:
            return self.classes[mimetype]
        else:
            basetype = "%s/*" % mimetype.split('/')[0]
            return self.classes.get(basetype, Response)
Return the most appropriate Response class for the given mimetype
stackoverflow/venv/lib/python3.6/site-packages/scrapy/responsetypes.py