Maison > Questions et réponses > le corps du texte
试了 EditThisCookie 和 Firebug 导出的Cookies数据,总是提示:
cookielib.LoadError: invalid Netscape format cookies file 'cookies.txt'
似乎格式总是不对,或许是cookielib的要求更严格吗?如果是要求严格,如何修改成cookielib可以load()的格式呢?
# Netscape HTTP Cookie File # http://curl.haxx.se/rfc/cookie_spec.html # This file was generated by EditThisCookie # URL: https://www.baidu.com/ .baidu.com FALSE / FALSE 1504606728.717546 BAIDUID A677D13A002AACD895915A0BB475F380:FG=1 .baidu.com FALSE / FALSE 3620921860.387831 BIDUPSID A677D13A002AACD895915A0BB475F380 .baidu.com FALSE / FALSE H_PS_PSSID 20049_1438_17711_17944_21080_17001_21160_20930 .baidu.com FALSE / FALSE H_WISE_SIDS 101556_100185_109660_107851_100097_108087_104341_108051_108466_110031_108437_108618_109921_109794_108343_109774_107961_107789_109738_109891_109531_110021_107896_109683_107805_108013_107312_107300_107242_109656 .baidu.com FALSE / FALSE 1474464036 plus_cv 1::m:2a9fb36a .baidu.com FALSE / FALSE 3620921860.387924 PSTM 1473438213 .www.baidu.com FALSE / FALSE 1474111014.158405 __bsi 13009778284056135735_00_0_I_R_2_0303_C02F_N_I_I_0 .www.baidu.com FALSE / FALSE 1476676699 ispeed_lsm 2 www.baidu.com TRUE / FALSE BD_CK_SAM 1 www.baidu.com TRUE / FALSE BD_HOME 0 www.baidu.com TRUE / FALSE 1474975008 BD_UPN 123253