pyhton selenium phantomJS cookie Can only set cookies for current domain” or "Unable to set Cookie"

出现这个问题的时候,我一开始也是一头雾水.


然后看了这篇文章,就是先用phantomJS  get的方式保存一份cookie格式,然后再用循环转换一下,将列表的形式转换成字典的形式,大概是这样子了吧??pyhton selenium phantomJS cookie Can only set cookies for current domain” or "Unable to set Cookie"

我自己的转换是这样的,循环感觉没有这么复杂,也没有用列表生成式去生成字典.

pyhton selenium phantomJS cookie Can only set cookies for current domain” or "Unable to set Cookie"

pyhton selenium phantomJS cookie Can only set cookies for current domain” or "Unable to set Cookie"

pyhton selenium phantomJS cookie Can only set cookies for current domain” or "Unable to set Cookie"