title: AttributeError: 'bytes' object has no attribute 'get'
body: <p>i am trying to extract all the brand names from <a href="https://www.gizbot.com/mobile-brands-in-india/" rel="nofollow noreferrer">https://www.gizbot.com/mobile-brands-in-india/</a>.
  Below is the code for mobiles_spiders.py file</p>
  <pre><code>class MobilesSpider(scrapy.Spider):
      name = &quot;mobiles&quot;
  
      def start_requests(self):
          urls = [
              'https://www.gizbot.com/mobile-brands-in-india/',
             
          ]
          for url in urls:
              yield scrapy.Request(url=url, callback=self.parse)
  
      def parse(self, response):
          page = response.url.split(&quot;/&quot;)[-2]
          filename = 'mobiles-%s.html' % page
          with open(filename, 'wb') as f:
              f.write(response.xpath(str.encode('.//div[has-class(&quot;all-brands-block-desc-brand&quot;)]/text()').get()))
          self.log('Saved file %s' % filename)
  
  </code></pre>
  <p>but the code is giving me error as
  AttributeError: 'bytes' object has no attribute 'get'
  i need suggestion as to what function i need to use instead of get() for extracting all the div elements that contains brand name.
  any help is appreciated.</p>