code: def _append_filename_extension(self, response: BaseResponse):
          '''Append an HTML/CSS file suffix as needed.'''
          if not self._filename:
              return
  
          if response.request.url_info.scheme not in ('http', 'https'):
              return
  
          if not re.search(r'\.[hH][tT][mM][lL]?$', self._filename) and \
                  HTMLReader.is_response(response):
              self._filename += '.html'
          elif not re.search(r'\.[cC][sS][sS]$', self._filename) and \
                  CSSReader.is_response(response):
              self._filename += '.cssf _append_filename_extension(self, response: BaseResponse):
          '''Append an HTML/CSS file suffix as needed.'''
          if not self._filename:
              return
  
          if response.request.url_info.scheme not in ('http', 'https'):
              return
  
          if not re.search(r'\.[hH][tT][mM][lL]?$', self._filename) and \
                  HTMLReader.is_response(response):
              self._filename += '.html'
          elif not re.search(r'\.[cC][sS][sS]$', self._filename) and \
                  CSSReader.is_response(response):
              self._filename += '.css'
docs: Append an HTML/CSS file suffix as needed.