Selenium在添加cookie时“Can only set Cookies for the current domain”错误处理

来源:互联网 发布:ubuntu更改系统语言 编辑:程序博客网 时间:2024/06/01 09:56

在用selenium添加cookie时遇到了“Can only set Cookies for the current domain”错误,经过一番搜索验证。
问题原因大概如下:某些网页里面用了一些selenium不支持的cookie键。
问题解决:通过try/except忽略这种错误继续执行就OK了,不影响正常功能。

阅读全文
1 0