Html response object has not attribute text
Question: 
    import scrapy
    
    from bs4 import BeautifulSoup
    
    
    class Spider(scrapy.Spider):
        name = "crawl"
        start_urls = [url]
    
        def parse(self, response):
            soup = BeautifulSoup(response.text)
            print soup.prettify()
    

I have this chunck of code. I'm using scrapy and when I execute it I get this
error:

    
    
      File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
        current.result = callback(current.result, *args, **kw)
      File "/vagrant_data/cars_scraper/cars_scraper/spiders/__init__.py", line 17, in parse
        soup = BeautifulSoup(response.text)
    exceptions.AttributeError: 'HtmlResponse' object has no attribute 'text'
    


Answer: Use [`Response.body`](http://doc.scrapy.org/en/latest/topics/request-
response.html#scrapy.http.Response.body) attribute instead of `text`.

