|
用站长的httphelp类 每次获得的cookie应该怎么处理的?
比如我访问第一个页面得到cookie a 访问第二个页面得到cookie b 访问第三个页面需要用到a和b 那访问时带的cookie就是a+b
接下来分别访问a和b页面 用如下方法记录cookie
result = http.GetHtml(item);
Cookies += result.Cookie;
现在问题来了 用cookies+=result.Cookie;
会生成很多冗余的cookie 有的是同名的cookie 这样好像会导致后续的访问不成功
大家有什么好的处理cookie的方式吗?不吝赐教啊 谢谢
以下cookie是我访问页面多次 累加而成的 访问页面越多 cookie累加越多
uikey=86913d6794024fbb8b7c77ff02bcb62007981f13e90664424981bfd0016824bd; PATH=/; DOMAIN=ptlogin2.qq.com;,pt_user_id=13471185226611367695; EXPIRES=Sat, 20-Apr-2024 11:36:57 GMT; PATH=/; DOMAIN=ui.ptlogin2.qq.com;,ptui_identifier=000D4456144B585FA55845900CEDD0D096626E7929C8E65D74663BA5; PATH=/; DOMAIN=ui.ptlogin2.qq.com;confirmuin=0; PATH=/; DOMAIN=ptlogin2.qq.com;,ptisp=ctc; PATH=/; DOMAIN=qq.com;verifysession=h02y9Aw4fl3L9YSZ447uk3aL689qMQby2KxgRViQx-lIqdagTqHbIZ0KwAgrX3zvOkF0bXjR_yahexRGGh0LRMz2A**; PATH=/; DOMAIN=qq.com;pt2gguin=o0776244739; EXPIRES=Fri, 02-Jan-2020 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,uin=o0776244739; PATH=/; DOMAIN=qq.com;,skey=@pDGlXx6v8; PATH=/; DOMAIN=qq.com;,ETK=; PATH=/; DOMAIN=ptlogin2.qq.com;,superuin=o0776244739; PATH=/; DOMAIN=ptlogin2.qq.com;,superkey=Y9GnUT5l5m1gjkijYhBHg226w38dk15*aRN6374oNG8_; PATH=/; DOMAIN=ptlogin2.qq.com; HttpOnly,supertoken=246994992; PATH=/; DOMAIN=ptlogin2.qq.com;,ptisp=ctc; PATH=/; DOMAIN=qq.com;,RK=LGuSF4O0fu; EXPIRES=Sat, 20-Apr-2024 11:37:03 GMT; PATH=/; DOMAIN=qq.com;,ptuserinfo=; PATH=/; DOMAIN=ptlogin2.qq.com;,ptcz=175df2888c04e62a68090e8d290825bbed624b30b1c68d34a722f58b6b82ab9e; EXPIRES=Fri, 02-Jan-2020 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,ptcz=; EXPIRES=Fri, 02-Jan-1970 00:00:00 GMT; PATH=/; DOMAIN=ptlogin2.qq.com;,airkey=; EXPIRES=Fri, 02-Jan-1970 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,luin=o0776244739; PATH=/; DOMAIN=qq.com; EXPIRES=Fri, 23-May-2014 11:37:03 GMT;,lskey=00010000fa83748478cc55356504ee2735567e2fc997736a11e7d25f5e3f3e1ec647e63164704dade30ec7b8; PATH=/; DOMAIN=qq.com; EXPIRES=Fri, 23-May-2014 11:37:03 GMT;pt2gguin=o0776244739; EXPIRES=Fri, 02-Jan-2020 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,uin=o0776244739; PATH=/; DOMAIN=qq.com;,skey=@pDGlXx6v8; PATH=/; DOMAIN=qq.com;,p_uin=o0776244739; PATH=/; DOMAIN=t.qq.com;,p_skey=-qwHwOkFdRlaKtNoIhJavr0ls-J6IixfLgsTIcwrdv4_; PATH=/; DOMAIN=t.qq.com;,pt4_token=n9hLTzIC1S9ncboXCh5*aw__; PATH=/; DOMAIN=t.qq.com;,p_uin=; EXPIRES=Fri, 02-Jan-1970 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,p_skey=; EXPIRES=Fri, 02-Jan-1970 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,pt4_token=; EXPIRES=Fri, 02-Jan-1970 00:00:00 GMT; PATH=/; DOMAIN=qq.com;,p_luin=o0776244739; PATH=/; DOMAIN=t.qq.com; EXPIRES=Fri, 23-May-2014 11:37:51 GMT;,p_lskey=000400000e9cebb024451c61446426772e881575e6e2db9ef82c6345dbcf2b4ca5fc2e3fcb532ecb1a41a906; PATH=/; DOMAIN=t.qq.com; EXPIRES=Fri, 23-May-2014 11:37:51 GMT;
谁有cookie操作类或者思路吗 能分享给初学小弟吗 万分感谢
|
|