code: def add_soup(response, soup_config):
          
          if ("text/html" in response.headers.get("Content-Type", "") or
                  Browser.__looks_like_html(response)):
              response.soup = bs4.BeautifulSoup(response.content, **soup_config)
          else:
              response.soup = None
docs: Attaches a soup object to a requests response.