def get_cookie(user, password):
    """Returns a webshots daily cookie given a user and a password."""
    cookie_jar = cookielib.CookieJar()
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar))
    response = opener.open(
        'http://www.webshots.com/login',
        urllib.urlencode({'done': '',
                          'username': user,
                          'password': password,
                          'lbReferer': 'http://www.webshots.com/',
                          'action': 'lb'}))
    resp = response.read().lower()
    if resp in '"c":-1':
        raise WBZLoginException, 'Incorrect username or password.'

    for cookie in cookie_jar:
        if cookie.name == 'daily':
            return cookie.value
    else:
        raise WBZLoginException, "Cookie not found!"
dataset/ETHPy150Open thesamet/webilder/src/webilder/webshots/utils.py/get_cookie/swapped operands of `in`