def get_sid(self, response): cookie = Cookie.BaseCookie(response.headers['Set-Cookie']) return cookie['sid'].value