self.crawl(url %(item['hash'],item['album_id']),fetch_type='js',callback=self.detail_page, js_script="""
function() {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g);
if(keys) {
for(var i = keys.length; i--;)
document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()
}
}""")
尝试了用js删除,也不行
pyspider 调用 phantomjs 本身不保存 cookies 啊,源代码第22行:
phantom.clearCookies();
https://github.com/binux/pysp...