cj = cookielib.LWPCookieJar()
for s_cookie in cookie:
    cj.set_cookie(cookielib.Cookie(version=0, name=s_cookie['name'], value=
        s_cookie['value'], port='80', port_specified=False, domain=s_cookie
        ['domain'], domain_specified=True, domain_initial_dot=False, path=
        s_cookie['path'], path_specified=True, secure=s_cookie['secure'],
        expires=s_cookie['expiry'], discard=False, comment=None,
        comment_url=None, rest=None, rfc2109=False))
loading cookies from selenium to mechanize with cookielib