1
nervouna 2014-01-13 18:27:22 +08:00
建议使用第三方库 requests
关于 Cookie: http://www.python-requests.org/en/latest/user/quickstart/#cookies urllib2 用起来有时候真的需要勇气…… |
2
Lycnir 2014-01-13 19:30:59 +08:00
支持LS
|
3
dancingbear OP 谢谢楼上,发现通过下列方式可以设置
ck = cookielib.Cookie(version=0, name='cookie名称', value='值', port=None, port_specified=False, domain='www.abc.cn', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False) cj.set_cookie(ck) |