'Requests uses this method internally to get cookie values. Takes as
args name and optional domain and path. Returns a cookie.value. If
there are conflicting cookies, _find arbitrarily chooses one. See
_find_no_duplicates if you want an exception thrown if there are
conflicting cookies.'

def _find(self, name, domain=None, path=None):

    for cookie in iter(self):
        if (cookie.name == name):
            if ((domain is None) or (cookie.domain == domain)):
                if ((path is None) or (cookie.path == path)):
                    return cookie.value
    raise KeyError(('name=%r,    domain=%r,    path=%r' % (name, domain, path)))
