code: def extract_cookies(self, response, request):
          
          _debug("extract_cookies: %s", response.info())
          self._cookies_lock.acquire()
          try:
              self._policy._now = self._now = int(time.time())
  
              for cookie in self.make_cookies(response, request):
                  if self._policy.set_ok(cookie, request):
                      _debug(" setting cookie: %s", cookie)
                      self.set_cookie(cookie)
          finally:
              self._cookies_lock.release()
docs: Extract cookies from response, where allowable given the request.