'Construct a Cookie object from a line of Set-Cookie header data.'

@classmethod
def from_string(cls, line, ignore_bad_cookies=False, ignore_bad_attributes=True):

    cookie_dict = parse_one_response(line, ignore_bad_cookies=ignore_bad_cookies, ignore_bad_attributes=ignore_bad_attributes)
    if (not cookie_dict):
        return None
    return cls.from_dict(cookie_dict, ignore_bad_attributes=ignore_bad_attributes)
